Turns are Better than Radians (2022)
- Programming
- Developer Tools
- Mathematics
- Graphics
- Infrastructure
The post argues that turns are often a better programming representation for angles than radians. In a turn-based system, 1.0 means a full rotation and simple fractions like 0.25 line up exactly with quarter turns. That matches a lot of real code better than radians do, especially when the job is to store an orientation, advance a phase, wrap values mod one revolution, or call trig functions numerically. Several people noted that this is already how many trig implementations effectively think internally after range reduction, so direct turn-based functions like sinpi or full-turn variants can avoid extra multiplies and some rounding noise.
If your code mostly stores, wraps, and compares angles, phases, or periodic positions, a turn-based API can reduce conversions and make fixed-point representations cleaner. Keep the underlying math in radians when you need derivatives, optimization, symbolic formulas, or to match published algorithms, and convert at the boundary.
-
computerenhance.com
- Discuss on HN