19 const float Math::PI = 3.14159265359f;
28 if (value < 0)
return start;
29 if (value > 1)
return end;
31 return start + (end - start) * value;
36 return (rand() % (max - min + 1)) + min;
39 float Math::Min(
const float value1,
const float value2)
41 if (value1 < value2)
return value1;
45 float Math::Max(
const float value1,
const float value2)
47 if (value1 > value2)
return value1;
53 if (value < 0)
return -value;
static float Max(const float value1, const float value2)
Get the greator of two numbers.
static const float PI_OVER4
Represents the value of pi divided by four.
static int GetRandomInt(const int min=0, const int max=RAND_MAX)
Get a random integer.
static const float INVERSE_180
Represents the value of one divided by 180.
static const float PI
Represents the value of pi.
static float Min(const float value1, const float value2)
Get the lessor of two numbers.
static const float INVERSE_PI
Represents the value of one divided by pi.
static float Lerp(float start, float end, float value)
Linearly interpolate between two values.
static const float PI_OVER2
Represents the value of pi divided by two.
static const float NORMALIZE_PI_OVER4
Represents the value of each component in a pi/4 unit vector.
static float Abs(const float value)
Get the absolute value of a number.
Katana Engine is a library of classes, interfaces, and value types that provides a foundation for dev...