chore: split public and src

This commit is contained in:
Marc Emmanuel 2026-01-13 12:47:37 +01:00
parent 9a8eb05b9c
commit 76f86497c7
684 changed files with 2 additions and 1 deletions

View file

@ -1,26 +0,0 @@
"use strict";
// FMG utils related to numbers
// round value to d decimals
function rn(v, d = 0) {
const m = Math.pow(10, d);
return Math.round(v * m) / m;
}
function minmax(value, min, max) {
return Math.min(Math.max(value, min), max);
}
// return value in range [0, 100]
function lim(v) {
return minmax(v, 0, 100);
}
// normalization function
function normalize(val, min, max) {
return minmax((val - min) / (max - min), 0, 1);
}
function lerp(a, b, t) {
return a + (b - a) * t;
}