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

Function clamp01

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

Source from the content-addressed store, hash-verified

32const DEFAULT_TARGET_FORMAT: GPUTextureFormat = 'bgra8unorm';
33
34const clamp01 = (v: number): number => Math.min(1, Math.max(0, v));
35const parseSeriesColorToRgba01 = (color: string): Rgba =>
36 parseCssColorToRgba01(color) ?? ([0, 0, 0, 1] as const);
37

Callers 1

prepareFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected