diff options
author | iperry <iperry@749a229e-a60e-11de-b98f-4500b42dc123> | 2010-01-08 01:22:43 +0000 |
---|---|---|
committer | iperry <iperry@749a229e-a60e-11de-b98f-4500b42dc123> | 2010-01-08 01:22:43 +0000 |
commit | a038b4f9875d06be339d3abb33967ec9a89c2f8a (patch) | |
tree | ebd77ccb2702f218207077594916f42491527375 /src/wiring/math.h | |
parent | 2addfe8c42c6bcdc0a15c751e2436447b73d03fe (diff) | |
download | librambutan-a038b4f9875d06be339d3abb33967ec9a89c2f8a.tar.gz librambutan-a038b4f9875d06be339d3abb33967ec9a89c2f8a.zip |
changed math.h to wiring_math.h to avoid collision with newlib's math library
git-svn-id: https://leaflabs.googlecode.com/svn/trunk/library@99 749a229e-a60e-11de-b98f-4500b42dc123
Diffstat (limited to 'src/wiring/math.h')
-rw-r--r-- | src/wiring/math.h | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/src/wiring/math.h b/src/wiring/math.h deleted file mode 100644 index 8f30396..0000000 --- a/src/wiring/math.h +++ /dev/null @@ -1,30 +0,0 @@ -#ifndef _MATH_H_ -#define _MATH_H_ - -void randomSeed(unsigned int); -long random(long); -long random(long, long); -long map(long, long, long, long, long); - -#define PI 3.1415926535897932384626433832795 -#define HALF_PI 1.5707963267948966192313216916398 -#define TWO_PI 6.283185307179586476925286766559 -#define DEG_TO_RAD 0.017453292519943295769236907684886 -#define RAD_TO_DEG 57.295779513082320876798154814105 - -#define min(a,b) ((a)<(b)?(a):(b)) -#define max(a,b) ((a)>(b)?(a):(b)) -#define constrain(amt,low,high) ((amt)<(low)?(low):((amt)>(high)?(high):(amt))) -#define round(x) ((x)>=0?(long)((x)+0.5):(long)((x)-0.5)) -#define radians(deg) ((deg)*DEG_TO_RAD) -#define degrees(rad) ((rad)*RAD_TO_DEG) -#define sq(x) ((x)*(x)) - -/* undefine stdlib's abs if encountered */ -#ifdef abs -#undef abs -#endif -#define abs(x) (((x) > 0) ? (x) : -(unsigned)(x)) - -#endif - |