MCPcopy
hub / github.com/dolphin-wood/smooth-scrollbar / clamp

Function clamp

src/utils/clamp.ts:1–3  ·  view source on GitHub ↗
(value: number, lower: number, upper: number)

Source from the content-addressed store, hash-verified

1export function clamp(value: number, lower: number, upper: number): number {
2 return Math.max(lower, Math.min(upper, value));
3}

Callers 12

scrollToFunction · 0.90
scrollIntoViewFunction · 0.90
setPositionFunction · 0.90
scrollFunction · 0.90
calcMomentumFunction · 0.90
_willOverscrollMethod · 0.90
_absorbMomentumMethod · 0.90
_addAmplitudeMethod · 0.90
_renderXMethod · 0.90
_renderYMethod · 0.90
setFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…