INIT
This commit is contained in:
+6
@@ -0,0 +1,6 @@
|
||||
/**
|
||||
* Clamps a number between a minimum and maximum value.
|
||||
*/
|
||||
export function clamp(n, min, max) {
|
||||
return Math.min(max, Math.max(min, n));
|
||||
}
|
||||
Reference in New Issue
Block a user