Created
March 21, 2020 13:35
-
-
Save droid001/9bbf0dd9eff47542363b99fe44b150a6 to your computer and use it in GitHub Desktop.
rounds off number by given amount of decimal points
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const roundOff = (num, decimalPoints)=>Math.round( num * Math.pow(10, decimalPoints) ) / Math.pow(10, decimalPoints) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment