refactor(es modules): deploy setup

This commit is contained in:
Azgaar 2022-06-26 13:22:33 +03:00
parent ad252b54e6
commit f9aeaddf52
3 changed files with 21 additions and 4 deletions

View file

@ -1,4 +1,4 @@
// round value to d decimals
// round value to n decimals
export function rn(value: number, decimals: number = 0) {
const multiplier = Math.pow(10, decimals);
return Math.round(value * multiplier) / multiplier;
@ -17,5 +17,3 @@ export function lim(value: number) {
export function normalize(val: number, min: number, max: number) {
return minmax((val - min) / (max - min), 0, 1);
}
// import {rn, minmax, lim, normalize} from '/src/utils/numberUtils';