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

Function clamp01

src/renderers/createCandlestickRenderer.ts:39–39  ·  view source on GitHub ↗
(v: number)

Source from the content-addressed store, hash-verified

37const INSTANCE_STRIDE_FLOATS = INSTANCE_STRIDE_BYTES / 4;
38
39const clamp01 = (v: number): number => Math.min(1, Math.max(0, v));
40const clampInt = (v: number, lo: number, hi: number): number => Math.min(hi, Math.max(lo, v | 0));
41
42const parseSeriesColorToRgba01 = (color: string): Rgba =>

Callers 1

prepareFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected