MCPcopy Index your code
hub / github.com/ChartGPU/ChartGPU / clamp

Function clamp

src/interaction/createInsideZoom.ts:10–10  ·  view source on GitHub ↗
(v: number, lo: number, hi: number)

Source from the content-addressed store, hash-verified

8}>;
9
10const clamp = (v: number, lo: number, hi: number): number => Math.min(hi, Math.max(lo, v));
11
12const normalizeWheelDelta = (e: WheelEvent, basisCssPx: number): number => {
13 const raw = e.deltaY;

Callers 1

onWheelFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected