Add fixed decimals to toFloat util

This commit is contained in:
Vortrex
2021-02-03 11:58:24 -06:00
parent 7aa2eb028c
commit 38ac5449fd

View File

@@ -147,8 +147,8 @@ function toInteger(val) {
// ---------------------------------------------------------------------------
function toFloat(val) {
return parseFloat(val);
function toFloat(val, fixed = 2) {
return parseFloat((val).toFixed(fixed));
}
// ---------------------------------------------------------------------------