Answers for "react native float upto 2 digits"

0

react native float upto 2 digits

Use Math.round(num * 100) / 100

Edit: to ensure things like 1.005 round correctly, we use

Math.round((num + Number.EPSILON) * 100) / 100
Posted by: Guest on July-17-2020

Code answers related to "react native float upto 2 digits"

Code answers related to "Javascript"

Browse Popular Code Answers by Language