@@ -65,6 +65,15 @@ export class SovTools { | |||
else return null; | |||
} | |||
static formatNumberWithoutRounding(number, toFixed) { | |||
if (number){ | |||
let factor = Math.pow(10, toFixed); | |||
return Math.floor(number * factor) / factor | |||
}else{ | |||
return null | |||
} | |||
} | |||
static formatNumberWithoutFixed(number) { | |||
if (typeof number == 'string') number = number.replace(',', '.'); | |||
if (number) return Number(number); |