Turns are Better than Radians (2022)

277 points · 150 comments on HN · read original →

Points and comments are a snapshot, not live.

Replace radians with turns for simpler, faster trig functions.

The author argues that radians impose unnecessary computation: user code multiplies by tau or pi before calling sin, and library code divides pi back out internally. Parameterizing angles in turns (0 to 1 for a full circle) eliminates these operations, yields exact bit patterns for common angles (0.25 = 90 degrees), and simplifies library constants. Half-turns (0 to 2 per circle) are already supported in sincospi intrinsics on platforms like CUDA. Switching can be done by adjusting a single constant in custom trig implementations.

The author recommends deleting pi/tau constants from codebases and adopting turn-based trig, calling sincospi where available, and optionally supporting legacy radians by thunking through the new turn-based functions with a divide-by-tau conversion.

What commenters are saying

Commenters split: some advocate turns for exact quarter-turns and reduced rounding, while others note that radians keep trigonometric scaling terms (2π) implicit, avoiding extra factors in formulas. A deep thread debates whether angles are dimensionless: one camp treats degrees and radians as pure numbers, another insists they carry units that cancel. Math educator Spivak is cited arguing sin takes a pure number, not a unit-bearing input. Several links explore the dimensional-analysis controversy-recent proposals to formalize the radian as a fundamental unit were rebutted for disrupting established dimensionless groups. Commenters also note that programming types model physics units poorly, and that applying functions to units is conventional, not logically forbidden.