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

Function clamp01

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

Source from the content-addressed store, hash-verified

37const TAU = Math.PI * 2;
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 nextPow2 = (v: number): number => {

Callers 1

parseColorFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected