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

Function clamp01

src/interaction/findCandlestick.ts:11–11  ·  view source on GitHub ↗
(v: number)

Source from the content-addressed store, hash-verified

9}
10
11const clamp01 = (v: number): number => Math.min(1, Math.max(0, v));
12
13const parsePercent = (value: string): number | null => {
14 const m = value.trim().match(/^(\d+(?:\.\d+)?)%$/);

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected