ohctechv3/.svn/pristine/ef/efc966cb0c1222f7366f1ea1242c82c0803ed44f.svn-base
2024-10-28 15:03:36 +05:30

8 lines
262 B
Plaintext

import { max as mathMax, min as mathMin } from "./math.js";
export function within(min, value, max) {
return mathMax(min, mathMin(value, max));
}
export function withinMaxClamp(min, value, max) {
var v = within(min, value, max);
return v > max ? max : v;
}