1
0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-06-28 15:38:30 +02:00
VVVVVV/desktop_version/src/Maths.h
Misa a346379413 Remove unused math.h include from Maths.h
Apparently this was in here, just completely unused.
2021-09-27 23:11:20 -07:00

52 lines
663 B
C

#ifndef MATHGAME_H
#define MATHGAME_H
#include <stdlib.h>
//// This header holds Maths functions that emulate the functionality of flash's
//random
//Returns 0..1
float inline fRandom(void)
{
return ( float(rand()) / float(RAND_MAX)) ;
}
inline int clamp(int x, int a, int b)
{
return x < a ? a : (x > b ? b : x);
}
struct point
{
int x;
int y;
};
inline int VVV_min(const int a, const int b)
{
if (a < b)
{
return a;
}
else
{
return b;
}
}
inline int VVV_max(const int a, const int b)
{
if (a > b)
{
return a;
}
else
{
return b;
}
}
#endif /* MATHGAME_H */