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

Function clamp

src/components/createDataZoomSlider.ts:16–16  ·  view source on GitHub ↗
(v: number, lo: number, hi: number)

Source from the content-addressed store, hash-verified

14}
15
16const clamp = (v: number, lo: number, hi: number): number => Math.min(hi, Math.max(lo, v));
17
18const normalizeRange = (range: ZoomRange): ZoomRange => {
19 let { start, end } = range;

Callers 2

normalizeRangeFunction · 0.70
applyRangeToDomFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected