This commit is contained in:
Mathieu Oriol
2024-09-10 17:37:41 +02:00
parent 284dccb702
commit 0f2d0dc86a
2 changed files with 10 additions and 1 deletions

View File

@@ -10,4 +10,4 @@
*/
export function map(value, oldMin, oldMax, newMin, newMax) {
return ((value - oldMin) / (oldMax - oldMin)) * (newMax - newMin) + newMin;
}
}