Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Wow. Beautiful math. Such insight. Thank you for sharing.

  var PI2 = Math.PI * 2.0;
That should be Math.TAU, right?



OK, what the hell is going on here?


"powers of three" - see the comment on line 653 [1] of the same file

[1] https://github.com/torvalds/linux/blob/d158fc7f36a25e19791d2...



Javascript doesn't have a TAU constant in it's Math object (yet). He could have added it with Math.TAU = Math.PI * 2; though.


Or alternatively continued to use PI2 like basically everybody else on the globe who wants to actually use it for things.


Exactly.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: