Commit eafe2579 authored by syadziy's avatar syadziy

push rounding math

parent 1a05bda9
......@@ -6,3 +6,8 @@ export function titleCase(text) {
return value
}
export function roundMath(number, decimalPlaces) {
const factorOfTen = Math.pow(10, decimalPlaces)
return Math.round(number * factorOfTen) / factorOfTen
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment