WIP Исправил ошибку срабатывания интервала

This commit is contained in:
DwCay
2023-05-23 14:42:17 +03:00
parent 7a39fc8961
commit 971ef269fe
2 changed files with 17 additions and 3 deletions

View File

@@ -0,0 +1,6 @@
export function roundedNumber(val, digits, rounded = "floor") {
let fraction = 10 * digits;
return fraction
? Math[rounded](val * fraction) / fraction
: Math[rounded](val);
}