28 #ifndef ROCKETCOREMATH_H
29 #define ROCKETCOREMATH_H
40 template <
typename Type >
41 Type
Max(Type a, Type b)
43 return (a > b) ? a : b;
46 template<
typename Type >
47 Type
Min(Type a, Type b)
49 return (a < b) ? a : b;
52 template <
typename Type >
55 return (value < min) ? min : value;
58 template <
typename Type >
61 return (value > max) ? max: value;
64 template<
typename Type >
65 Type
Clamp(Type value, Type min, Type max)
67 return (value < min) ? min : (value > max) ? max : value;
Type Min(Type a, Type b)
Definition: Math.h:47
ROCKETCORE_API int RoundUp(float value)
ROCKETCORE_API float Sin(float angle)
ROCKETCORE_API float Cos(float angle)
Type Clamp(Type value, Type min, Type max)
Definition: Math.h:65
ROCKETCORE_API float NormaliseAngle(float angle)
Definition: Clipboard.h:33
ROCKETCORE_API int RoundDown(float value)
ROCKETCORE_API float AbsoluteValue(float value)
ROCKETCORE_API bool RandomBool()
ROCKETCORE_API float ACos(float value)
ROCKETCORE_API bool IsZero(float value)
ROCKETCORE_API int RandomInteger(int max_value)
Type ClampUpper(Type value, Type max)
Definition: Math.h:59
ROCKETCORE_API float RandomReal(float max_value)
ROCKETCORE_API float DegreesToRadians(float angle)
ROCKETCORE_API int ToPowerOfTwo(int value)
ROCKETCORE_API float Tan(float angle)
ROCKETCORE_API int RealToInteger(float value)
Type ClampLower(Type value, Type min)
Definition: Math.h:53
ROCKETCORE_API bool AreEqual(float value_0, float value_1)
ROCKETCORE_API float ATan2(float y, float x)
Type Max(Type a, Type b)
Definition: Math.h:41
ROCKETCORE_API const float ROCKET_PI
ROCKETCORE_API float SquareRoot(float value)
ROCKETCORE_API float ASin(float angle)
ROCKETCORE_API float RadiansToDegrees(float angle)
ROCKETCORE_API int HexToDecimal(char hex_digit)
ROCKETCORE_API int Round(float value)