Return to Snippet

Revision: 66883
at July 16, 2014 15:53 by pmw57


Initial Code
if (!Math.TAU) {
    Math.TAU = 2 * Math.PI;
}

Initial URL

                                

Initial Description
Brendan Eich is working on officially adding Math.TAU to JavaScript.
Until JavaScript has full support for the Math.TAU constant, you can add the following at the start of your programs to add support for the TAU constant.

Initial Title
Math.TAU polyfill

Initial Tags
math, support

Initial Language
JavaScript