Functions | |
| float | Sin (float f) |
| Returns the sine of angle f in radians. | |
| float | Cos (float f) |
| Returns the cosine of angle f in radians. | |
| float | Tan (float f) |
| Returns the tangent of angle f in radians. | |
| float | ATan2 (float y, float x) |
| Returns the angle in radians whose Tan is y/x. | |
| float | Fabs (float f) |
| Returns the absolute value of f. | |
| float | ACos (float f) |
| Returns the arc-cosine of f - the angle in radians whose cosine is f. | |
| float | Sqrt (float f) |
| Returns square root of f. | |
| int | Abs (int i) |
| Returns the absolute value of i. | |
| float | Ceil (float f) |
| Returns the smallest integer greater to or equal to f. | |
| float | Floor (float f) |
| Returns the largest integer smaller to or equal to f. | |
| float | Log (float f) |
| Returns the natural (base e) logarithm of a specified number. | |
| float | Pow (float x, float y) |
| Returns f raised to power p. | |
| float | Deg2Rad (float degs) |
| Degrees-to-radians conversion. | |
| float | Rad2Deg (float rads) |
| Radians-to-Degrees conversion. | |
| float | InvSqrt (float f) |
| Returns inverse square root of f. | |
| float | IncMax (const float val, const float inc, const float dest) |
| returns val +(or minus) inc and never goes above or below dest value | |
| int | SysRand () |
| Range 0..32767. | |
| int | Rand () |
| Range 0..32767. | |
| uint8 | RandByte () |
| Range 0..255. | |
| int | RandMax (const int max) |
| Range 0..max-1. | |
| float | NLerp (const float a, const float b, const float t) |
| Calculates the linear parameter t that produces the interpolant value within the range [a, b]. | |
| float | Accelerate (const float val, const float accel, const float max) |
| return val that increases by accel in a weird way to the max value. | |
| float | RandFloat () |
| Range 0..1. | |
| float | RandCFloat () |
| Range -1..1. | |
| float | RandRange (const float min, const float max) |
| Returns a random float number between and min [inclusive] and max [inclusive]. | |
| int | Clamp (const int i, const int min, const int max) |
| Returns clamped value between min and max. | |
| float | Clampf (const float f, const float min, const float max) |
| Returns clamped value between min and max. | |
| float | Lerp (float start, const float end, const float time) |
| Linearly interpolates between start and end by time. | |
| float | CosTween (const float t) |
| return (0.5f - (Cos(t * pi) * 0.5f)); | |
| float | CosArc (const float t) |
| return (-((Cos(Deg2Rad(360.0f * t)) - 1.0f) * 0.5f)); | |
| float | SmoothStep (const float from, const float to, const float t) |
| Interpolates between min and max with smoothing at the limits. | |
| float | HermiteBlend (const float a, const float b, const float t) |
| float | Min (const float a, const float b) |
| Returns the smallest of the two values. | |
| float | Max (const float a, const float b) |
| Returns the largest of the two values. | |
| const int | f2i (const float f) |
| IEEE 754 float to int. | |
| const float | i2f (const int i) |
| int to IEEE 754 float | |
Variables | |
| const float | pi = 3.1415927f |
| const float | tau = 6.2831855f |
| pi * 2 | |
| const kVec3 | vecZero (0.0f, 0.0f, 0.0f) |
| int Math::Abs | ( | int | i | ) |
Returns the absolute value of i.
| float Math::Accelerate | ( | const float | val, |
| const float | accel, | ||
| const float | max ) |
return val that increases by accel in a weird way to the max value.
| float Math::ACos | ( | float | f | ) |
Returns the arc-cosine of f - the angle in radians whose cosine is f.
| float Math::ATan2 | ( | float | y, |
| float | x ) |
Returns the angle in radians whose Tan is y/x.
| float Math::Ceil | ( | float | f | ) |
Returns the smallest integer greater to or equal to f.
| int Math::Clamp | ( | const int | i, |
| const int | min, | ||
| const int | max ) |
Returns clamped value between min and max.
| float Math::Clampf | ( | const float | f, |
| const float | min, | ||
| const float | max ) |
Returns clamped value between min and max.
| float Math::Cos | ( | float | f | ) |
Returns the cosine of angle f in radians.
| float Math::CosArc | ( | const float | t | ) |
return (-((Cos(Deg2Rad(360.0f * t)) - 1.0f) * 0.5f));
| float Math::CosTween | ( | const float | t | ) |
return (0.5f - (Cos(t * pi) * 0.5f));
| float Math::Deg2Rad | ( | float | degs | ) |
Degrees-to-radians conversion.
| const int Math::f2i | ( | const float | f | ) |
IEEE 754 float to int.
| float Math::Fabs | ( | float | f | ) |
Returns the absolute value of f.
| float Math::Floor | ( | float | f | ) |
Returns the largest integer smaller to or equal to f.
| float Math::HermiteBlend | ( | const float | a, |
| const float | b, | ||
| const float | t ) |
| const float Math::i2f | ( | const int | i | ) |
int to IEEE 754 float
| float Math::IncMax | ( | const float | val, |
| const float | inc, | ||
| const float | dest ) |
returns val +(or minus) inc and never goes above or below dest value
| float Math::InvSqrt | ( | float | f | ) |
Returns inverse square root of f.
| float Math::Lerp | ( | float | start, |
| const float | end, | ||
| const float | time ) |
Linearly interpolates between start and end by time.
| float Math::Log | ( | float | f | ) |
Returns the natural (base e) logarithm of a specified number.
| float Math::Max | ( | const float | a, |
| const float | b ) |
Returns the largest of the two values.
| float Math::Min | ( | const float | a, |
| const float | b ) |
Returns the smallest of the two values.
| float Math::NLerp | ( | const float | a, |
| const float | b, | ||
| const float | t ) |
Calculates the linear parameter t that produces the interpolant value within the range [a, b].
| float Math::Pow | ( | float | x, |
| float | y ) |
Returns f raised to power p.
| float Math::Rad2Deg | ( | float | rads | ) |
Radians-to-Degrees conversion.
| int Math::Rand | ( | ) |
Range 0..32767.
| uint8 Math::RandByte | ( | ) |
Range 0..255.
| float Math::RandCFloat | ( | ) |
Range -1..1.
| float Math::RandFloat | ( | ) |
Range 0..1.
| int Math::RandMax | ( | const int | max | ) |
Range 0..max-1.
| float Math::RandRange | ( | const float | min, |
| const float | max ) |
Returns a random float number between and min [inclusive] and max [inclusive].
| float Math::Sin | ( | float | f | ) |
Returns the sine of angle f in radians.
| float Math::SmoothStep | ( | const float | from, |
| const float | to, | ||
| const float | t ) |
Interpolates between min and max with smoothing at the limits.
| float Math::Sqrt | ( | float | f | ) |
Returns square root of f.
| int Math::SysRand | ( | ) |
Range 0..32767.
| float Math::Tan | ( | float | f | ) |
Returns the tangent of angle f in radians.
| const float Math::pi = 3.1415927f |
Definition at line 2462 of file t1_scriptAPI.cpp.
| const float Math::tau = 6.2831855f |
pi * 2
Definition at line 2463 of file t1_scriptAPI.cpp.
| const kVec3 Math::vecZero(0.0f, 0.0f, 0.0f) | ( | 0. | 0f, |
| 0. | 0f, | ||
| 0. | 0f ) |