|
libRocket
|
Functions | |
| template<typename Type > | |
| Type | Max (Type a, Type b) |
| template<typename Type > | |
| Type | Min (Type a, Type b) |
| template<typename Type > | |
| Type | ClampLower (Type value, Type min) |
| template<typename Type > | |
| Type | ClampUpper (Type value, Type max) |
| template<typename Type > | |
| Type | Clamp (Type value, Type min, Type max) |
| ROCKETCORE_API bool | IsZero (float value) |
| ROCKETCORE_API bool | AreEqual (float value_0, float value_1) |
| ROCKETCORE_API float | AbsoluteValue (float value) |
| ROCKETCORE_API float | Cos (float angle) |
| ROCKETCORE_API float | ACos (float value) |
| ROCKETCORE_API float | Sin (float angle) |
| ROCKETCORE_API float | ASin (float angle) |
| ROCKETCORE_API float | Tan (float angle) |
| ROCKETCORE_API float | ATan2 (float y, float x) |
| ROCKETCORE_API float | RadiansToDegrees (float angle) |
| ROCKETCORE_API float | DegreesToRadians (float angle) |
| ROCKETCORE_API float | NormaliseAngle (float angle) |
| ROCKETCORE_API float | SquareRoot (float value) |
| ROCKETCORE_API int | Round (float value) |
| ROCKETCORE_API int | RoundUp (float value) |
| ROCKETCORE_API int | RoundDown (float value) |
| ROCKETCORE_API int | RealToInteger (float value) |
| ROCKETCORE_API int | ToPowerOfTwo (int value) |
| ROCKETCORE_API int | HexToDecimal (char hex_digit) |
| ROCKETCORE_API float | RandomReal (float max_value) |
| ROCKETCORE_API int | RandomInteger (int max_value) |
| ROCKETCORE_API bool | RandomBool () |
Variables | |
| ROCKETCORE_API const float | ROCKET_PI |
| ROCKETCORE_API float Rocket::Core::Math::AbsoluteValue | ( | float | value | ) |
Calculates the absolute value of a number.
| [in] | value | The number of get the absolute value of. |
| ROCKETCORE_API float Rocket::Core::Math::ACos | ( | float | value | ) |
Calculates the arc-cosine of an value.
| [in] | angle | The value to calculate the arc-cosine of. |
| ROCKETCORE_API bool Rocket::Core::Math::AreEqual | ( | float | value_0, |
| float | value_1 | ||
| ) |
Evaluates if two floating-point numbers are equal, or so similar that they could be considered so.
| [in] | value_0 | The first number to compare. |
| [in] | value_1 | The second number to compare. |
| ROCKETCORE_API float Rocket::Core::Math::ASin | ( | float | angle | ) |
Calculates the arc-sine of an value.
| [in] | angle | The value to calculate the arc-sine of. |
| ROCKETCORE_API float Rocket::Core::Math::ATan2 | ( | float | y, |
| float | x | ||
| ) |
Calculates the angle of a two-dimensional line.
| [in] | y | The y-component of the line. |
| [in] | x | The x-component of the line. |
| Type Rocket::Core::Math::Clamp | ( | Type | value, |
| Type | min, | ||
| Type | max | ||
| ) |
| Type Rocket::Core::Math::ClampLower | ( | Type | value, |
| Type | min | ||
| ) |
| Type Rocket::Core::Math::ClampUpper | ( | Type | value, |
| Type | max | ||
| ) |
| ROCKETCORE_API float Rocket::Core::Math::Cos | ( | float | angle | ) |
Calculates the cosine of an angle.
| [in] | angle | The angle to calculate the cosine of, in radians. |
| ROCKETCORE_API float Rocket::Core::Math::DegreesToRadians | ( | float | angle | ) |
Converts an angle from degrees to radians.
| [in] | The | angle, in degrees. |
| ROCKETCORE_API int Rocket::Core::Math::HexToDecimal | ( | char | hex_digit | ) |
Converts from the ASCII-representation of a hexadecimal digit to decimal.
| [in] | hex_digit | The hexadecimal digit to convert to decimal. |
| ROCKETCORE_API bool Rocket::Core::Math::IsZero | ( | float | value | ) |
Evaluates if a number is, or close to, zero.
| [in] | value | The number to compare to zero. |
| Type Rocket::Core::Math::Max | ( | Type | a, |
| Type | b | ||
| ) |
| Type Rocket::Core::Math::Min | ( | Type | a, |
| Type | b | ||
| ) |
| ROCKETCORE_API float Rocket::Core::Math::NormaliseAngle | ( | float | angle | ) |
Normalises and angle in radians
| [in] | The | angle, in randians |
| ROCKETCORE_API float Rocket::Core::Math::RadiansToDegrees | ( | float | angle | ) |
Converts an angle from radians to degrees.
| [in] | The | angle, in radians. |
| ROCKETCORE_API bool Rocket::Core::Math::RandomBool | ( | ) |
Generates a random boolean value, with equal chance of true or false.
| ROCKETCORE_API int Rocket::Core::Math::RandomInteger | ( | int | max_value | ) |
Generates a random integer value between 0 and a user-specified value.
| [in] | max_value | The limit to random value. The generated value will be guaranteed to be below this limit. |
| ROCKETCORE_API float Rocket::Core::Math::RandomReal | ( | float | max_value | ) |
Generates a random floating-point value between 0 and a user-specified value.
| [in] | max_value | The limit to random value. The generated value will be guaranteed to be below this limit. |
| ROCKETCORE_API int Rocket::Core::Math::RealToInteger | ( | float | value | ) |
Efficiently truncates a floating-point value into an integer.
| [in] | value | The value to truncate. |
| ROCKETCORE_API int Rocket::Core::Math::Round | ( | float | value | ) |
Rounds a floating-point value to the nearest integer.
| [in] | value | The value to round. |
| ROCKETCORE_API int Rocket::Core::Math::RoundDown | ( | float | value | ) |
Rounds a floating-point value down to the nearest integer.
| [in] | value | The value to round. |
| ROCKETCORE_API int Rocket::Core::Math::RoundUp | ( | float | value | ) |
Rounds a floating-point value up to the nearest integer.
| [in] | value | The value to round. |
| ROCKETCORE_API float Rocket::Core::Math::Sin | ( | float | angle | ) |
Calculates the sine of an angle.
| [in] | angle | The angle to calculate the sine of, in radians. |
| ROCKETCORE_API float Rocket::Core::Math::SquareRoot | ( | float | value | ) |
Calculates the square root of a value.
| [in] | value | The value to calculate the square root of. This must be above zero. |
| ROCKETCORE_API float Rocket::Core::Math::Tan | ( | float | angle | ) |
Calculates the tangent of an angle.
| [in] | angle | The angle to calculate the tangent of, in radians. |
| ROCKETCORE_API int Rocket::Core::Math::ToPowerOfTwo | ( | int | value | ) |
Converts a number to the nearest power of two, rounding up if necessary.
| [in] | value | The value to convert to a power-of-two. |
| ROCKETCORE_API const float Rocket::Core::Math::ROCKET_PI |
1.8.8