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

Function clamp

src/ChartGPU.ts:171–171  ·  view source on GitHub ↗
(v: number, lo: number, hi: number)

Source from the content-addressed store, hash-verified

169const hasSliderDataZoom = (options: ChartGPUOptions): boolean => options.dataZoom?.some((z) => z?.type === 'slider') ?? false;
170
171const clamp = (v: number, lo: number, hi: number): number => Math.min(hi, Math.max(lo, v));
172
173type InteractionScalesCache = {
174 rectWidthCss: number;

Callers 3

zoomInFunction · 0.70
zoomOutFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected