Math functions and constants used in the base game.
|
| f32 | frsqrt (f32 x) |
| |
| f32 | SinFIdx (f32 fidx) |
| |
| f32 | CosFIdx (f32 fidx) |
| |
| std::pair< f32, f32 > | SinCosFIdx (f32 fidx) |
| |
| f32 | AtanFIdx_ (f32 x) |
| |
| f32 | Atan2FIdx (f32 y, f32 x) |
| |
| u32 | FindRootsQuadratic (f32 a, f32 b, f32 c, f32 &root1, f32 &root2) |
| |
| f32 | Hermite (f32 p0, f32 m0, f32 p1, f32 m1, f32 t) |
| | Evaluates a cubic Hermite curve at a given parameter t.
|
| |
| static f32 | sqrt (f32 x) |
| |
| static f32 | sin (f32 x) |
| |
| static f32 | cos (f32 x) |
| |
| static f32 | asin (f32 x) |
| |
| static f32 | acos (f32 x) |
| |
| static f32 | atan2 (f32 y, f32 x) |
| |
| static f32 | abs (f32 x) |
| |
| static f64 | force25Bit (f64 x) |
| | This is used to mimic the Wii's floating-point unit.
|
| |
| static f32 | fma (f32 x, f32 y, f32 z) |
| | Fused multiply-add operation.
|
| |
| static f32 | fms (f32 x, f32 y, f32 z) |
| | Fused multiply-subtract operation.
|
| |
| static f64 | frsqrte (const f64 val) |
| |
| static f32 | fres (const f32 val) |
| |
| static f32 | finv (f32 x) |
| | Fused Newton-Raphson operation.
|
| |
| f32 EGG::Mathf::Hermite |
( |
f32 | p0, |
|
|
f32 | m0, |
|
|
f32 | p1, |
|
|
f32 | m1, |
|
|
f32 | t ) |
|
nodiscard0x80085070 |
Evaluates a cubic Hermite curve at a given parameter t.
Computes
\[H(t) = h_0(t)\,p_0 + h_1(t)\,p_1 + h_2(t)\,m_0 + h_3(t)\,m_1\]
where the cubic Hermite basis functions are:
\[h_0(\theta) = 2\theta^3 - 3\theta^2 + 1\]
\[h_1(\theta) = -2\theta^3 + 3\theta^2\]
\[h_2(\theta) = \theta^3 - 2\theta^2 + \theta\]
\[h_3(\theta) = \theta^3 - \theta^2\]
- Parameters
-
| p0 | Start value. |
| m0 | Start tangent. |
| p1 | End value. |
| m1 | End tangent. |
| t | Interpolation parameter in the domain [0, 1] |
- Returns
- Interpolated value at
t.
Definition at line 479 of file Math.cc.