heptagon/examples/MissionComputer_for_Core/mathext.c
2010-07-29 10:43:32 +02:00

15 lines
413 B
C

#include <math.h>
#include "mathext.h"
#define WRAP_FUN_DEF(FNAME, CNAME, TY_IN, TY_OUT) \
void FNAME ## _step(TY_IN a, FNAME ## _out *out) { \
out->o = CNAME(a); \
}
WRAP_FUN_DEF(atanr, atan, float, float)
WRAP_FUN_DEF(acosr, acos, float, float)
WRAP_FUN_DEF(cosr, cos, float, float)
WRAP_FUN_DEF(asinr, asin, float, float)
WRAP_FUN_DEF(sinr, sin, float, float)
WRAP_FUN_DEF(sqrtr, sqrt, float, float)