Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
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
10
const
clamp = (v: number, lo: number, hi: number): number => Math.min(hi, Math.max(lo, v));
11
12
const
normalizeWheelDelta = (e: WheelEvent, basisCssPx: number): number => {
13
const
raw = e.deltaY;
Callers
1
onWheel
Function · 0.70
Calls
no outgoing calls
Tested by
no test coverage detected