Rescales `x` from the range `[xMin, xMax]` to `[yMin, yMax]`. */
| 149 | /** Rescales `x` from the range `[xMin, xMax]` to `[yMin, yMax]`. |
| 150 | */ |
| 151 | inline float rescale(float x, float xMin, float xMax, float yMin, float yMax) { |
| 152 | return yMin + (x - xMin) / (xMax - xMin) * (yMax - yMin); |
| 153 | } |
| 154 | |
| 155 | /** Linearly interpolates between `a` and `b`, from `p = 0` to `p = 1`. |
| 156 | */ |
no outgoing calls
no test coverage detected