Where value sits in [min, max], 0 to 1, clamped. A degenerate range reads 0 rather than dividing by zero.
value
[min, max]
import { sliderFraction } from '@datamoc/mw_games/two-d/ui';console.log(sliderFraction(30, 0, 60)); // 0.5 Copy
import { sliderFraction } from '@datamoc/mw_games/two-d/ui';console.log(sliderFraction(30, 0, 60)); // 0.5
Where
valuesits in[min, max], 0 to 1, clamped. A degenerate range reads 0 rather than dividing by zero.