The Greek letter τ (tau) is a suggested symbol for the circle constant representing the ratio between circumference and radius. The constant is equal to 2π (2 times pi), and approximately 6.28. Source: math.wikia
yarn add math-tau
Read the Tau Manifesto!
const tau = require('math-tau');
Calculating the circumference of a circle
const calculateCircumference = radius => tau * radius;
calculateCircumference(10) // 62.83185307179586
Euler's Formula
const eulerFormula = i => Math.cos(tau) + i * Math.sin(tau)
eulerFormula(0) // Always (almost) 1
Extending native Math object
Math.TAU = tau;
Run npm test
or testling to run the test suite.
tau-js is currently under M.I.T license.