Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Math Round

const round = (n, d) => Number(Math.round(n + "e" + d) + "e-" + d)

round(1.005, 2) //1.01
round(1.555, 2) //1.56
Source by livecodestream.dev #
 
PREVIOUS NEXT
Tagged: #Math #Round
ADD COMMENT
Topic
Name
8+6 =