0.1.2 • Published 3 years ago

@honux/mathf v0.1.2

Weekly downloads
1
License
MIT
Repository
github
Last release
3 years ago

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