Browse Source

Remove default arguments from math::rescale() since it's non-obvious whether they should apply to the input or output scale.

tags/v2.0.0
Andrew Belt 3 years ago
parent
commit
f6cba26b8d
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      include/math.hpp

+ 1
- 1
include/math.hpp View File

@@ -148,7 +148,7 @@ inline float chop(float x, float epsilon = 1e-6f) {

/** Rescales `x` from the range `[xMin, xMax]` to `[yMin, yMax]`.
*/
inline float rescale(float x, float xMin, float xMax, float yMin = 0.f, float yMax = 1.f) {
inline float rescale(float x, float xMin, float xMax, float yMin, float yMax) {
return yMin + (x - xMin) / (xMax - xMin) * (yMax - yMin);
}



Loading…
Cancel
Save