Package Exports
- @honux/mathf
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@honux/mathf) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
MathF.js
MathF is a JavaScript library that provides constants and static methods for common mathematical functions.
Install
npm install @honux/mathfQuick 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.