25 static const float PI;
38 static float Lerp(
float start,
float end,
float value);
44 static int GetRandomInt(
const int min = 0,
const int max = RAND_MAX);
54 static float Min(
const float value1,
const float value2);
60 static float Max(
const float value1,
const float value2);
65 static float Abs(
const float value);
83 static T Clamp(
const T min,
const T max,
const T value)
85 return (value < min) ? min : (value > max) ? max : value;
93 static float Clamp(
const float min,
const float max,
const float value)
103 template <
typename T>
106 return (value >= min) && (value <= max);
114 static bool IsInRange(
const float min,
const float max,
const float value)
Provides commonly used floating point functions and constants.
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 float ToDegrees(const float radians)
Converts radians to degrees.
static float ToRadians(const float degrees)
Converts degrees to radians.
static bool IsInRange(const float min, const float max, const float value)
Determines if a value is within a specified range.
static int GetRandomInt(const int min=0, const int max=RAND_MAX)
Get a random integer.
static float GetRandomFloat()
Get a random number between zero and one.
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 T Clamp(const T min, const T max, const T value)
Restricts a value to be within a specified range.
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 bool IsInRange(const T min, const T max, const T value)
Determines if a value is within a specified range.
static float Clamp(const float min, const float max, const float value)
Restricts a value to be within a specified range.
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...