Maths · function
wrapAngle
Fold an angle into (-π, π]. Simulation state uses this so a long session cannot accumulate an unbounded angle and lose float precision. Anything replaying a recorded session depends on staying bit-stable over its length.
Explained in Coordinates and units.
function wrapAngle(a: number): numberimport { wrapAngle } from '@driftengine/core';Parameters
| Parameter | Type | Description |
|---|---|---|
a | number |