![]() |
Blamite Game Engine - Strings
00411.04.21.24.0017.blamite
A library containing general purpose utilities and classes for use in multiple projects.
|
Namespace containing math-related utilities. More...
Functions | |
STRINGS_API bool | FloatIsInteger (float float_value) |
Determines whether or not the specified float is a valid integer. More... | |
STRINGS_API float | FloatDegreesToRadians (float float_value) |
Converts a float value from Degrees to Radians. More... | |
STRINGS_API float | FloatRadiansToDegrees (float float_value) |
Converts a float value from Radians to Degrees. More... | |
STRINGS_API uint64_t | GenerateRandomUInt64 () |
Generates a random unsigned 64-bit integer. More... | |
STRINGS_API float | GetDistance2D (float x1, float y1, float x2, float y2) |
Calculates the distance between two points in 2D space. More... | |
STRINGS_API float | GetDistance2D (BlamVector2 first, BlamVector2 second) |
Calculates the distance between two points in 2D space. More... | |
STRINGS_API BlamVector4 | GetQuaternionFromRotation (BlamVector3 rotation) |
Generates a quaternion from XYZ (Yaw, Pitch, Roll) rotation angles. More... | |
STRINGS_API float | Normalize (float value, float min, float max) |
Normalizes a value between a minimum and maximum range. More... | |
Namespace containing math-related utilities.
float BlamStrings::Utils::Math::FloatDegreesToRadians | ( | float | float_value | ) |
Converts a float value from Degrees to Radians.
float_value | - The value to convert, in degrees. |
bool BlamStrings::Utils::Math::FloatIsInteger | ( | float | float_value | ) |
Determines whether or not the specified float is a valid integer.
Will return false if the float value is more than 0.00001 away from an even number.
float_value | - The float to evaluate. |
true
if the float in an integer, false
if it is not. float BlamStrings::Utils::Math::FloatRadiansToDegrees | ( | float | float_value | ) |
Converts a float value from Radians to Degrees.
float_value | - The value to convert, in radians. |
uint64_t BlamStrings::Utils::Math::GenerateRandomUInt64 | ( | ) |
Generates a random unsigned 64-bit integer.
float BlamStrings::Utils::Math::GetDistance2D | ( | BlamVector2 | first, |
BlamVector2 | second | ||
) |
Calculates the distance between two points in 2D space.
first | - The first point. |
second | - The second point. |
float BlamStrings::Utils::Math::GetDistance2D | ( | float | x1, |
float | y1, | ||
float | x2, | ||
float | y2 | ||
) |
Calculates the distance between two points in 2D space.
x1 | - The X coordinate of the first point. |
y1 | - The Y coordinate of the first point. |
x2 | - The X coordinate of the second point. |
y2 | - The Y coordinate of the second point. |
BlamVector4 BlamStrings::Utils::Math::GetQuaternionFromRotation | ( | BlamVector3 | rotation | ) |
Generates a quaternion from XYZ (Yaw, Pitch, Roll) rotation angles.
rotation | - The rotation vector containing yaw, pitch, and roll. All values should be in degrees, not radians. |
float BlamStrings::Utils::Math::Normalize | ( | float | value, |
float | min, | ||
float | max | ||
) |
Normalizes a value between a minimum and maximum range.
If the provided value is outside of the range (ie, above the max value or below the min value), then it will be clamped to the minimum or maximum value.
value | - The value to normalize. |
min | - The lower bound of the range. |
max | - The upper bound of the range. |