math.js
A simple math library written in Javascript
Install
Use
// load the modulevar math = ; // ask for a number's ceilmath;
Arithmetic functions
// Get a number's ceilmath; // returns 13math; // returns 14 // Get a number's ceil on the 2nd decimal digitmath; // returns 14.14math; // returns 14.15 // Get a number's round on the 2nd decimal digitmath; // returns 14.14math; // returns 14.14 // Get a number's floor on the 2nd decimal digitmath; // returns 14.14math; // returns 14.14 // Get a number's trunc on the 2nd decimal digitmath; // returns 14.14math; // returns 14.14
Test
To execute the library's tests, first install the project dependencies:
$ npm install
Then, run the tests
$ npm test