2.0.2 • Published 5 years ago
somemaths v2.0.2
Some maths
Installation
npm install somemaths
Usage
var { Maths, OneD, PrimeNumbers, Random, ThreeD, TwoD, Geometry, Vector } = require('somemaths');
var numberRandom = Random.randomInt(1000);
Output can be 485
or
var numberRandom = Random.randomFloat(1000,3);
can be 256.368
and Prime number :
console.log(PrimeNumbers.PN(3));
return in the console : Array(3) ["2", "3", "5"]
You can also decompose your number into Prime Numbers !
console.log(PrimeNumbers.ConvertToPN(154))
And it return : Array(3) ["2", "7", "11"]
API
(in dev)
Class
PrimeNumbers
Random
OneD // = 1D
TwoD // = 2D
ThreeD // = 3D
Geometry
Maths
Vector
Static function of the class PrimeNumbers
.PN(nb)
.ConvertToPN(nb, Isfull?)
Static function of the class Random
.randomFloat(max, maxDigit?)
.randomInt(max)
Static function of the class OneD
.IsAlign(x[])
.FindMiddle(x[])
Static function of the class TwoD
.IsAlign(x[], y[])
.FindMiddle(x[], y[])
Static function of the class ThreeD
.IsAlign(x[], y[], z[])
.FindMiddle(x[], y[], z[])
Static function of the class Geometry
.AreaSquare(x)
.VolumeSquare(x)
.AreaRectangle(L, l)
.VolumeRectangle(L, l, h)
.AreaTriangle(b, h)
.VolumeRegularPrism(b, h, H)
.AreaCircle(r)
.VolumeSphere(r)
Static function of the class Maths
.Percentage(mix, max)
.toPositive(number)
.toNegative(number)
Static function of the class Vector
.calc(orgine?, ...vector)
Test
npm test
Changelog
1.0.0
: Create a test command
2.0.0
: Rework all of the function and transform it to class; Rework the README; Delete files not used; Add Vetor
2.0.1
: Error on the README
2.0.2
: Change some color on the README
2.0.2
5 years ago
2.0.1
5 years ago
2.0.0
5 years ago
1.0.0
6 years ago
0.3.4
6 years ago
0.3.0
6 years ago
0.2.6
6 years ago
0.3.2
6 years ago
0.3.1
6 years ago
0.3.3
6 years ago
0.2.5
6 years ago
0.2.4
6 years ago
0.2.3
6 years ago
0.2.2
6 years ago
0.2.1
6 years ago
0.2.0
6 years ago
0.1.9
6 years ago
0.1.8
6 years ago
0.1.7
6 years ago
0.1.6
6 years ago
0.1.5
6 years ago
0.1.4
6 years ago
0.1.3
6 years ago
0.1.2
6 years ago
0.1.1
6 years ago
0.1.0
6 years ago