ReflexBall Rally
 All Data Structures Files Functions Variables Macros
math.h
Go to the documentation of this file.
1 #ifndef _math_h_
2 #define _math_h_
3 
4 #define FIX14_SHIFT 14
5 
6 #define FIX14_MULT(a, b) ((a*b) >> FIX14_SHIFT)
7 #define FIX14_DIV(a, b) (a << FIX14_SHIFT / b)
8 
9 typedef struct {
10  long x,y;
11 } TVector;
12 
13 // Public
14 long expand(long input);
15 void printNumber(long input, unsigned char decimalBits, unsigned char decimal);
16 void printFix(long input, unsigned char decimal);
17 long sin(int val);
18 long cos(int val);
19 void initVector(TVector* v, long x, long y);
20 void rotate(TVector* v, int val);
21 void printVector(TVector* v);
22 
23 #endif