Browse Source

math Functions: replace float with T

sbg
Dennis Mannhart 6 years ago committed by Daniel Agar
parent
commit
80193cd227
  1. 4
      src/lib/mathlib/math/Functions.hpp

4
src/lib/mathlib/math/Functions.hpp

@ -146,8 +146,8 @@ const T gradual(const T &value, const T &x_low, const T &x_high, const T &y_low, @@ -146,8 +146,8 @@ const T gradual(const T &value, const T &x_low, const T &x_high, const T &y_low,
} else {
/* linear function between the two points */
float a = (y_high - y_low) / (x_high - x_low);
float b = y_low - a * x_low;
T a = (y_high - y_low) / (x_high - x_low);
T b = y_low - a * x_low;
return a * value + b;
}
}

Loading…
Cancel
Save