node package manager

pi

Going deeper inside of the PI number.

$ pi

Going deeper inside of the PI number.

You can install the package globally and use it as command line tool:

$ npm i -g pi

Then, run pi --help and see what the CLI tool can do.

$ pi --help
3.

Here is an example how to use this package as library. To install it locally, as library, you can do that using npm:

$ npm i --save pi
// Dependencies 
var PI = require("pi");
 
console.log(PI(3));
// => 3.14 
 
console.log("First 16 decimals: " + PI(16, false));
// => First 16 decimals: 141592653589793 

For full API reference, see the DOCUMENTATION.md file.

Have an idea? Found a bug? See how to contribute.

MIT © Ionică Bizău