pmw57
pmw57
I'm finding myself always having to set Math.TAU as a constant, or to include a constant definition library to achieve something similar. I for one would much rather work out...
The standard technique is to check it it's not already defined, before adding it. ``` if (!Math.TAU) { Math.TAU = 2 * Math.PI; } ```
The usage of TAU is also makes the formulas more consistent throughout. Using diameter for the circumference and then shifting to using the radius for area and volume is a...