diff --git a/src/lib/mathlib/math/Functions.hpp b/src/lib/mathlib/math/Functions.hpp index 1a6016d2a2384a7d4e08957a9388a293122fb935..59ae0ea21067cfe71fafeb06b61c5319a6e63324 100644 --- a/src/lib/mathlib/math/Functions.hpp +++ b/src/lib/mathlib/math/Functions.hpp @@ -175,13 +175,13 @@ const T gradual(const T &value, const T &x_low, const T &x_high, const T &y_low, template<typename T> const T expontialFromLimits(const T &X_in, const T &Y_min, const T &Y_mid, const T &Y_max) { - T SIGMA_NORM = (T)0.001; + const T delta = (T)0.001; // constrain X_in to the range of 0 and 2 T X = math::constrain(X_in, (T)0, (T)2); // If Y_mid is exactly in the middle, then just apply linear approach. bool use_linear_approach = false; - if (((Y_max + Y_min) * (T)0.5) - Y_mid < SIGMA_NORM) { + if (((Y_max + Y_min) * (T)0.5) - Y_mid < delta) { use_linear_approach = true; }