MCPcopy Create free account
hub / github.com/bytebase/bytebase / minmax

Function minmax

frontend/src/utils/math.ts:1–5  ·  view source on GitHub ↗
(value: number, min: number, max: number)

Source from the content-addressed store, hash-verified

1export const minmax = (value: number, min: number, max: number) => {
2 if (value < min) return min;
3 if (value > max) return max;
4 return value;
5};

Callers 9

handleInputChangeFunction · 0.90
progressiveDelayFunction · 0.90
useDragCanvasFunction · 0.90
fitBBoxFunction · 0.90
moveFunction · 0.90
HoverPanelFunction · 0.90
DatabaseHoverPanelFunction · 0.90
pollFunction · 0.90
usePollingFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected