35 lines
554 B
C
35 lines
554 B
C
#ifndef _FIXED_H_
|
|
#define _FIXED_H_
|
|
|
|
#include <stdint.h>
|
|
|
|
typedef int32_t fixed;
|
|
|
|
fixed itofix(int x);
|
|
int fixtoi(fixed x);
|
|
|
|
fixed ftofix(double x);
|
|
double fixtof(fixed x);
|
|
|
|
fixed fadd(fixed x, fixed y);
|
|
fixed fsub(fixed x, fixed y);
|
|
fixed fmul(fixed x, fixed y);
|
|
fixed fdiv(fixed x, fixed y);
|
|
|
|
const fixed fixtorad_r;
|
|
const fixed radtofix_r;
|
|
|
|
fixed fcos(fixed x);
|
|
fixed fsin(fixed x);
|
|
fixed ftan(fixed x);
|
|
|
|
fixed facos(fixed x);
|
|
fixed fasin(fixed x);
|
|
fixed fatan(fixed x);
|
|
|
|
fixed fatan2(fixed y, fixed x);
|
|
|
|
fixed fsqrt(fixed n);
|
|
|
|
#endif /* _FIXED_H_ */
|