MCPcopy Create free account
hub / github.com/Mrinank-Bhowmick/python-beginner-projects / clamp

Function clamp

web/src/components/Playground.tsx:97–98  ·  view source on GitHub ↗
(v: number, lo: number, hi: number)

Source from the content-addressed store, hash-verified

95const nl = (s: string) => s.replace(/\r?\n/g, "\r\n");
96
97const clamp = (v: number, lo: number, hi: number) =>
98 Math.max(lo, Math.min(hi, v));
99
100// Stable empty-array default so the prop reference doesn't change each render.
101const NO_PACKAGES: string[] = [];

Callers 1

PlaygroundFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected