Project

General

Profile

Statistics
| Revision:

root / trunk / code / lib / src / libdragonfly / math.c @ 88

History | View | Annotate | Download (350 Bytes)

1 88 bcoltin
#include "math.h"
2
3
/**
4
 * @defgroup math Math
5
 * Function(s) for performing math operations
6
 *
7
 * @{
8
 **/
9
10
/**
11
 * finds the absolute value of x
12
 *
13
 * @param x the int of which we want to take its absolute value
14
 *
15
 * @return the absolute value of x
16
 **/
17
int abs_int (int x) {
18
19
  if(x < 0)
20
    return -x;
21
22
  return x;
23
}
24
25
/**@}**/ //end defgroup