Write _.clamp()

This commit is contained in:
marleyrae 2023-06-27 18:13:07 -07:00
parent b99375d295
commit 534819ee57

View file

@ -1,2 +1,8 @@
let _ = {}
/* --------------------------------------------------------------- clamp ---- */
_.clamp = (num, lower, higher) => Math.min(Math.max(num, lower), higher)
// Do not write or modify code below this line. // Do not write or modify code below this line.
module.exports = _ module.exports = _