Colour sensors calibrated
Dependencies: mbed-rtos mbed Servo QEI
Fork of ICRSEurobot13 by
supportfuncs.h
- Committer:
- madcowswe
- Date:
- 2013-04-07
- Revision:
- 17:6263e90bf3ba
- Parent:
- 16:52250d8d8fce
- Child:
- 19:4b993a9a156e
File content as of revision 17:6263e90bf3ba:
#ifndef SUPPORTFUNCS_H #define SUPPORTFUNCS_H #define _USE_MATH_DEFINES #include <cmath> //Constrains agles to +/- pi inline float constrainAngle(float x){ x = fmod(x + M_PI, 2*M_PI); if (x < 0) x += 2*M_PI; return x - M_PI; } #endif //SUPPORTFUNCS_H