You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
8 lines
262 B
8 lines
262 B
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;
|
|
}
|