Module deterministic

Source
Expand description

Explicit arithmetic for simulation that must avoid platform libm variation. These helpers do not make an entire game deterministic by themselves.

Functions§

sin_cos
Sine/cosine with fixed f64 range reduction and polynomial evaluation, then one f32 rounding. No platform trig calls or fused multiply-add operations. Nonfinite input returns NaNs. Intended for bounded game input angles; huge angles lose reduction accuracy. Absolute error is below 2e-7 for [-2π,2π].