Capítulo 139 de 411
normalize() maps a value within a range to a 0-1 progress — the same as mapRange() with the output hard-coded to 0/1.
| Signature | Description |
|---|---|
normalize(min, max, valueToNormalize) | returns the normalized number immediately |
normalize(min, max) | returns a reusable function |
gsap.utils.normalize(-10, 10, 0); // 0.5
gsap.utils.normalize(0, 100, 25); // 0.25