matheuscorreia / tau-js

:globe_with_meridians: τ is the right way

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TAU

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

Why?

Read the Tau Manifesto!

TAU is (still) wrong video

Usage

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;

Testing

Run npm test or testling to run the test suite.

License

tau-js is currently under M.I.T license.

About

:globe_with_meridians: τ is the right way


Languages

Language:JavaScript 100.0%