4 ms·
Wow. Beautiful math. Such insight. Thank you for sharing. var PI2 = Math.PI * 2.0; That should be Math.TAU, right?
by line-o 11y ago
Wow. Beautiful math. Such insight. Thank you for sharing.
var PI2 = Math.PI * 2.0;
That should be Math.TAU, right?
- onion2k 11y agoJavascript doesn't have a TAU constant in it's Math object (yet). He could have added it with Math.TAU = Math.PI * 2; though.
- line-o 11y agoExactly.
- GFK_of_xmaspast 11y agoOr alternatively continued to use PI2 like basically everybody else on the globe who wants to actually use it for things.
- cosmolev 11y agoIt's much better than this: https://github.com/torvalds/linux/blob/d158fc7f36a25e19791d25a55da5623399a2644f/fs/ext4/resize.c#L698 https://github.com/torvalds/linux/blob/d158fc7f36a25e19791d2...
- daniel-levin 11y agoOK, what the hell is going on here?
- cosmolev 11y agohttp://stackoverflow.com/a/22010740/972676 http://stackoverflow.com/a/22010740/972676
- delta1 11y ago"powers of three" - see the comment on line 653 [1] of the same file [1] https://github.com/torvalds/linux/blob/d158fc7f36a25e19791d25a55da5623399a2644f/fs/ext4/resize.c#L653 https://github.com/torvalds/linux/blob/d158fc7f36a25e19791d2...