2011-11-16 21:49:56 -04:00
|
|
|
|
|
|
|
#define ft2m(x) ((x) * 0.3048)
|
|
|
|
#define kt2mps(x) ((x) * 0.514444444)
|
|
|
|
#define sqr(x) ((x)*(x))
|
2012-03-01 00:22:11 -04:00
|
|
|
#define ToRad(x) (x*0.01745329252) // *pi/180
|
2011-11-16 21:49:56 -04:00
|
|
|
|
|
|
|
void set_nonblocking(int fd);
|
2011-11-18 19:07:11 -04:00
|
|
|
double normalise(double v, double min, double max);
|
2011-11-28 01:01:23 -04:00
|
|
|
double normalise180(double v);
|
2011-12-26 04:11:50 -04:00
|
|
|
void runInterrupt(uint8_t inum);
|
2012-03-01 00:22:11 -04:00
|
|
|
|
2012-03-28 06:47:33 -03:00
|
|
|
// generate a random float between -1 and 1
|
|
|
|
#define rand_float() (((((unsigned)random()) % 2000000) - 1.0e6) / 1.0e6)
|
|
|
|
|
|
|
|
#ifdef VECTOR3_H
|
|
|
|
Vector3f rand_vec3f(void);
|
|
|
|
#endif
|