(value: number, min: number, max: number)
| 29 | * Constrain a value between min and max |
| 30 | */ |
| 31 | export function clamp(value: number, min: number, max: number): number { |
| 32 | return Math.min(Math.max(value, min), max); |
| 33 | } |
| 34 | |
| 35 | /** |
| 36 | * Snap a value to the nearest snap point if within tolerance |
no outgoing calls
no test coverage detected
searching dependent graphs…