jumpstorm/engine/utils/clamp.ts

3 lines
101 B
TypeScript
Raw Normal View History

export const clamp = (num: number, min: number, max: number) =>
Math.min(Math.max(num, min), max);