Project

General

Profile

Revision 335

more docs

View differences:

utils.c
31 31
    return SUCCESS;
32 32
}
33 33

  
34
int16_t min16(int16_t a, int16_t b){ return (b < a ? b : a); }
35
uint16_t umin16(uint16_t a, uint16_t b){ return (b < a ? b : a); }
34
int16_t min_16(int16_t a, int16_t b){ return (b < a ? b : a); }
35
uint16_t umin_16(uint16_t a, uint16_t b){ return (b < a ? b : a); }
36 36
int32_t min32(int32_t a, int32_t b){ return (b < a ? b : a); }
37 37
double  dmin (double  a, double  b){ return (b < a ? b : a); }
38 38

  
39
int16_t max16(int16_t a, int16_t b){ return (a < b ? b : a); }
40
uint16_t umax16(uint16_t a, uint16_t b){ return (a < b ? b : a); }
39
int16_t max_16(int16_t a, int16_t b){ return (a < b ? b : a); }
40
uint16_t max_u16(uint16_t a, uint16_t b){ return (a < b ? b : a); }
41 41
int32_t max32(int32_t a, int32_t b){ return (a < b ? b : a); }
42
double  dmax (double  a, double  b){ return (a < b ? b : a); }
42
double  max_d (double  a, double  b){ return (a < b ? b : a); }
43 43

  
44
double dabs(double a)          { return (a < 0 ? -a: a); }
44
double abs_d(double a)          { return (a < 0 ? -a: a); }
45 45

  
46
int deq(double a, double b){ return (dabs(a-b) < 1e-10 ? true : false); }
46
int eq_d(double a, double b){ return (abs_d(a-b) < 1e-10 ? true : false); }

Also available in: Unified diff