Posted By

pmw57 on 07/16/14


math pi support tau polyfill

Versions (?)

Math.TAU polyfill

 / Published in: JavaScript

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.

  1. if (!Math.TAU) {
  2. Math.TAU = 2 * Math.PI;
  3. }

Report this snippet  

You need to login to post a comment.