@mathools/round
v1.0.0
Published
some very usefull math tools
Downloads
1
Readme
@mathools/round
@mathools round module for approximations calcs
Installing
For install library is easy to install by cloning the repo. You can install trhought npm too: Local installation
npm install @mathools/round
Global installation
npm install -g @mathools/round
Contains
Round
round(number, decimals=0, pass=10)
=> thenumber
rounded atpass
withdecimals
approximationFloor
floor(number, decimals=0, pass=10)
=> thenumber
rounded down atpass
withdecimals
approximationCeil
ceil(number, decimals=0, pass=10)
=> thenumber
rounded up atpass
withdecimals
approximationTrunc
trunc(number)
=> truncate the number loosing all decimalsRound (Float 32)
roundf32(number)
=> round the number to the nearest float32 numberCircular
circular(number, min, max, inclused)
=> costrain anumber
to stay betweenmin
andmax
(ifinclused
is trumin
andmax
are inclused (>=min, <=max), else are rejected (>min, <max))
Contacts
If you like the project feel free to contact me on my .
Something gone wrong? Feel free to rise an issue!
Did you like this project and it was usefull? Help me improve my work: