diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2013-10-07 14:11:24 +0200 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2013-10-07 14:11:24 +0200 |
| commit | 677385ffdd1e330cfba4dd712ca58595feeea41d (patch) | |
| tree | d256c7c6a86b3efe4af2e97fa72cc35eb32ec33e /calc.h | |
| download | fx-maze-677385ffdd1e330cfba4dd712ca58595feeea41d.tar.gz fx-maze-677385ffdd1e330cfba4dd712ca58595feeea41d.zip | |
initial commit
Diffstat (limited to 'calc.h')
| -rw-r--r-- | calc.h | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -0,0 +1,21 @@ +#ifndef _CALC_H_
+#define _CALC_H_
+
+#define Abs(x) ((x < 0)? -x : x)
+#define degtorad(x) (x * 0.0174532925)
+#define sgn(x) ((int)((x > 0) ? 1 : (x == 0)?0:-1))
+
+#define GetBit(x, y) (x & (1 << y)) != 0
+#define SetBit(x, y) (x |= (1 << y))
+#define ClearBit(x, y) (x &= ~(1 << y))
+
+#define crand() random()
+
+void seedrandom(void);
+unsigned int random(void);
+void table(void);
+void fill(unsigned int *, unsigned int, unsigned int);
+
+extern int TDist[64];
+
+#endif
|
