mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-16 12:37:20 +00:00
minimal popper implementation for context menu placement
This commit is contained in:
@@ -12,3 +12,4 @@ export * from "./uuid";
|
||||
export { FromSchema } from "./typebox/from-schema";
|
||||
export * from "./test";
|
||||
export * from "./runtime";
|
||||
export * from "./numbers";
|
||||
|
||||
5
app/src/core/utils/numbers.ts
Normal file
5
app/src/core/utils/numbers.ts
Normal file
@@ -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