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

Function clampInt

src/core/createRenderCoordinator.ts:627–627  ·  view source on GitHub ↗
(v: number, lo: number, hi: number)

Source from the content-addressed store, hash-verified

625
626const clamp01 = (v: number): number => Math.min(1, Math.max(0, v));
627const clampInt = (v: number, lo: number, hi: number): number => Math.min(hi, Math.max(lo, v | 0));
628
629const lerp = (a: number, b: number, t01: number): number => a + (b - a) * clamp01(t01);
630

Callers 4

recomputeRenderSeriesFunction · 0.70
renderFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected