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

Function clamp01

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

Source from the content-addressed store, hash-verified

46const DEFAULT_RGBA: readonly [number, number, number, number] = [1, 1, 1, 1];
47
48const clamp01 = (v: number): number => Math.min(1, Math.max(0, v));
49const clampInt = (v: number, lo: number, hi: number): number => Math.min(hi, Math.max(lo, v | 0));
50
51const isFiniteScissor = (s: HighlightPoint['scissor']): boolean =>

Callers 1

brightenFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected