MCPcopy Index your code
hub / github.com/ionic-team/ionic-framework / valueToRatio

Function valueToRatio

core/src/components/range/range.tsx:1253–1255  ·  view source on GitHub ↗
(value: number, min: number, max: number)

Source from the content-addressed store, hash-verified

1251};
1252
1253const valueToRatio = (value: number, min: number, max: number): number => {
1254 return clamp(0, (value - min) / (max - min), 1);
1255};
1256
1257let rangeIds = 0;

Callers 4

updateMethod · 0.85
ratioLowerMethod · 0.85
updateRatioMethod · 0.85
renderRangeSliderMethod · 0.85

Calls 1

clampFunction · 0.90

Tested by

no test coverage detected