MCPcopy Index your code
hub / github.com/ChartGPU/ChartGPU / clamp01

Function clamp01

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

Source from the content-addressed store, hash-verified

75const INSTANCE_STRIDE_BYTES = INSTANCE_STRIDE_FLOATS * 4;
76
77const clamp01 = (v: number): number => Math.min(1, Math.max(0, v));
78
79const nextPow2 = (v: number): number => {
80 if (!Number.isFinite(v) || v <= 0) return 1;

Callers 1

prepareFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected