(v, min = 0, max = 100)
| 11 | }; |
| 12 | |
| 13 | const clamp = (v, min = 0, max = 100) => Math.min(Math.max(v, min), max); |
| 14 | const round = (v, precision = 3) => parseFloat(v.toFixed(precision)); |
| 15 | const adjust = (v, fMin, fMax, tMin, tMax) => round(tMin + ((tMax - tMin) * (v - fMin)) / (fMax - fMin)); |
| 16 |
no outgoing calls
no test coverage detected