Project

General

Profile

Statistics
| Revision:

root / branches / lib_additions / code / projects / libdragonfly / math.c @ 45

History | View | Annotate | Download (350 Bytes)

1
#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