@mathools/round v1.0.0
@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/roundGlobal installation
npm install -g @mathools/roundContains
Round
round(number, decimals=0, pass=10)=> thenumberrounded atpasswithdecimalsapproximationFloor
floor(number, decimals=0, pass=10)=> thenumberrounded down atpasswithdecimalsapproximationCeil
ceil(number, decimals=0, pass=10)=> thenumberrounded up atpasswithdecimalsapproximationTrunc
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 anumberto stay betweenminandmax(ifinclusedis truminandmaxare 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:
8 years ago