From 6b8af9cf83851c075c6c9514b1deaa931c2b19a4 Mon Sep 17 00:00:00 2001 From: Thomas Guillermo Albers Raviola Date: Fri, 16 Jan 2026 23:02:32 +0100 Subject: Initial commit --- 07-july/src/util/util.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 07-july/src/util/util.h (limited to '07-july/src/util/util.h') diff --git a/07-july/src/util/util.h b/07-july/src/util/util.h new file mode 100644 index 0000000..5f82f30 --- /dev/null +++ b/07-july/src/util/util.h @@ -0,0 +1,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 +#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 -- cgit v1.2.3