'custom range slider - missing formula to calculate final value
I have slider with option to set a range (example from 25 to 100).
Max value of slider is 288 because width of its container is 288px.
I have to create a function which will take that range and calculate the final number not bigger than 100 and not lower than 25 (example).
const CURRENT_VALUE = 144;
const MAX_VALUE_OF_CONTAINER = 288;
// range
const MIN_VALUE = 25;
const MAX_VALUE = 100;
const CALCULATION = ?; // 🔴 REPLACE THIS WITH FORMULA
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|

