simple-mathematic
v0.2.1
Published
Simple & efficient implementation of common mathematic functions unavailable in Math module
Downloads
43
Readme
Simple Mathematic library
This library consists of common mathematic functions unavailable in Math module. Main focus is on simplicity & efficient implementation.
List of available functions:
- Sum
- Product
- Parity check
- Triangle number
- Factorial
- Geometry
- Area calculations
- Angle value conversions
Usage
simple-mathematic package can be used in both NodeJs and in browser.
Installing simple-mathematic as npm package:
npm install simple-mathematicThe aim of the package is to use functions in the same manner as we would do with native built-in JavaScript's Math module:
import { sum, isOdd, isEven } from 'simple-mathematic';
sum(1,2,3,4,5); // 15
isOdd(123); // true
isEven(123); // falseTo see the full documentation of usage of functions, plese refer to the list of functions section and refer to specific function
