UNPKG

262 BJavaScriptView Raw
1import { max as mathMax, min as mathMin } from "./math.js";
2export function within(min, value, max) {
3 return mathMax(min, mathMin(value, max));
4}
5export function withinMaxClamp(min, value, max) {
6 var v = within(min, value, max);
7 return v > max ? max : v;
8}
\No newline at end of file