mirror of
https://github.com/bknd-io/bknd/
synced 2026-08-03 00:26:01 +00:00
minimal popper implementation for context menu placement
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
export function clampNumber(value: number, min: number, max: number): number {
|
||||
const lower = Math.min(min, max);
|
||||
const upper = Math.max(min, max);
|
||||
return Math.max(lower, Math.min(value, upper));
|
||||
}
|
||||
Reference in New Issue
Block a user