else return null; | 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) { | static formatNumberWithoutFixed(number) { | ||||
if (typeof number == 'string') number = number.replace(',', '.'); | if (typeof number == 'string') number = number.replace(',', '.'); | ||||
if (number) return Number(number); | if (number) return Number(number); |