five-on-it / packages/world/src/pieces / canonicalYaw
Function: canonicalYaw()
canonicalYaw(
yaw):number
Defined in: packages/world/src/pieces.ts:396
A yaw wrapped into (−π, π], with a heading within a millionth of a radian of ±π written as +π: the level files hold six decimals, so a yaw of π reads back as 3.141593, a hair past π, and would otherwise come out of the editor as −π and change the file on the next export.
Parameters
yaw
number
Returns
number