news.volyx.in

Turns are better than radians (computerenhance.com)

699 points by todsacerdoti · 1444 days ago · 471 comments on HN

Article summary

The article argues that using turns instead of radians can simplify code, make it faster, and more precise. Turns are a mathematical construct where 0 is 0 degrees, 0.5 is 180 degrees, and 1 is 360 degrees. The article claims that most code can be improved by replacing pi with tau, but an even better approach is to remove pi entirely and use turns. This can be achieved by modifying sin and cos functions to take turns instead of radians.

Main themes

  • alternative angle units
  • mathematical constructs
  • code simplicity
  • teaching mathematics
  • unit conversion
  • mathematical formulas

What commenters say

  • Some commenters agree that using turns is more intuitive and easier to teach, especially for disinterested teenagers.
  • Others point out that the derivative of sin(x) is only cos(x) when the angle is in radians, and changing the unit of angle would introduce extra factors.
  • A few commenters mention that using turns or half-turns is already done in some math libraries, and it can be beneficial for certain applications.
  • There are different opinions on whether using turns would be more or less convenient than using radians, depending on the specific use case and the need for consistency.
  • Some argue that using turns would require rethinking and recalculating many mathematical formulas and constants.
  • Others suggest that introducing new named functions, such as sint and cost, could help to avoid confusion and make the transition to using turns smoother.