MCPcopy Create free account
hub / github.com/ChartGPU/ChartGPU / clamp

Function clamp

examples/million-points/main.ts:41–41  ·  view source on GitHub ↗
(v: number, lo: number, hi: number)

Source from the content-addressed store, hash-verified

39const DEFAULT_SAMPLING_THRESHOLD = 8192;
40
41const clamp = (v: number, lo: number, hi: number): number => Math.min(hi, Math.max(lo, v));
42
43const hasSliderDataZoom = (options: ChartGPUOptions): boolean => options.dataZoom?.some((z) => z?.type === 'slider') ?? false;
44

Callers 1

computeZoomAwareTargetFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected