blob: 5f82f30b47f52e9998ad87a1ea6ca4197178e211 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#ifndef UTIL_H
#define UTIL_H
#define toRadians(degrees) (degrees * 3.1415926 / 180.0f)
#define toDegrees(radians) (radians * 180.0f / 3.1415926)
#ifdef DEBUG
#include <stdio.h>
#define myAssert(expr) expr ? 1==1 : fprintf(stderr, "The expresion was not true\n")
#else
#define myAssert(expr)
#endif // DEBUG
extern void Util_FatalError( const char* error );
extern char* Util_LoadFile( const char* path );
extern float Util_RandomF(float min, float max);
extern int Util_RandomI(int min, int max);
#endif // UTIL_H
|