1.0.7 • Published 4 years ago
amega v1.0.7
Amega
All mathematical and other activities in one library!
NPM - Click here
GITHUB - Click here (Always the latest documentation)
The library was created in order to:
- Do all the math in one npm package
- Make simple algorithms fast
- Division into mathematics, physics, algorithms
install - npm install amega
Or - yarn add amega
Code example:
const amega = require("amega")
const Amega = new amega
console.log(Amega.Math.odd_numbers([4, 2, 5, 3])) // Console: [ 5, 3 ]
console.log(Amega.Math.even_numbers([4, 2, 5, 3])) // Console: [ 4, 2 ]
Class Math
Method sum
Adds all numbers in an array
Code example:
const amega = require("amega")
const Amega = new amega
console.log(Amega.Math.sum([ 1, 3, 5 ])) // Console: 9
Method odd_numbers
Selects only odd numbers from an array
Code example:
const amega = require("amega")
const Amega = new amega
console.log(Amega.Math.odd_numbers([4, 2, 5, 3])) // Console: [ 5, 3 ]
Method even_numbers
Selects only even numbers from an array
Code example:
const amega = require("amega")
const Amega = new amega
console.log(Amega.Math.even_numbers([4, 2, 5, 3])) // Console: [ 4, 2 ]