Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: WNC_Pubnub_obd2b_ign_em506SoftSerial_RESETFE2 mbed_xbeetest
constants.h
00001 #ifndef __CONSTANTS_H 00002 #define __CONSTANTS_H 00003 00004 //#define ULONG_MAX 4294967295UL 00005 00006 #define PI 3.1415926535897932384626433832795 00007 #define HALF_PI 1.5707963267948966192313216916398 00008 #define TWO_PI 6.283185307179586476925286766559 00009 #define DEG_TO_RAD 0.017453292519943295769236907684886 00010 #define RAD_TO_DEG 57.295779513082320876798154814105 00011 #define EULER 2.718281828459045235360287471352 00012 00013 /* 00014 #ifndef min 00015 #define min(a,b) ((a)<(b)?(a):(b)) 00016 #endif // min 00017 00018 #ifndef max 00019 #define max(a,b) ((a)>(b)?(a):(b)) 00020 #endif // max 00021 00022 #define abs(x) ((x)>0?(x):-(x)) 00023 */ 00024 00025 #define constrain(amt,low,high) ((amt)<(low)?(low):((amt)>(high)?(high):(amt))) 00026 #define round(x) ((x)>=0?(long)((x)+0.5):(long)((x)-0.5)) 00027 #define radians(deg) ((deg)*DEG_TO_RAD) 00028 #define degrees(rad) ((rad)*RAD_TO_DEG) 00029 #define sq(x) ((x)*(x)) 00030 00031 00032 #endif
Generated on Tue Jul 12 2022 18:12:16 by
1.7.2