@honux/mathf
v0.1.2
Published
JavaScript library that provides constants and static methods for common mathematical functions
Downloads
4
Readme
MathF.js
MathF is a JavaScript library that provides constants and static methods for common mathematical functions.
Install
npm install @honux/mathf
Quick Start
const { Mathf } = require('@honux/mathf');
console.log(Mathf.PI);
console.log(Mathf.isEven(2));
console.log(Mathf.isOdd(2));
Methods
- IsOdd(num) : return true if num is a odd number
- IsEven(num) : return true if num is a even number
Value
- PI : Represents the ratio of the circumference of a circle to its diameter, specified by the constant, π.
- E : Represents the natural logarithmic base, specified by the constant, e.
- Tau : 2 * PI
Reference
- This project is inspired by MathF class of .NET.