TECH Signal 490
Using turns instead of radians for trig calls removes pi/tau and improves precision
Casey Muratori argues that parameterizing angles in turns (0 to 1) instead of radians simplifies code, removes spurious pi/tau multiplications, and represents common angles exactly.
Adopting turns in your math library can reduce unnecessary multiplications and improve precision for common angles like 90 degrees (0.25). It also simplifies the mental model for periodic values already in [0,1]. However, it requires changing your sin/cos implementations and any code that expects radians.
Written by elseif from the cluster below · every claim links back to a sourceThe three things worth knowing
The article claims that most code multiplies by pi or tau to convert to radians, and the trig library immediately divides by pi, so the conversion is wasteful.
Using turns (0 to 1) makes common angles like 90 degrees (0.25) exactly representable, unlike radians.
The switch is easy: just change sin and cos to take turns instead of radians, eliminating pi and tau from the codebase.
THE CLUSTER
↗