Skip to content
Snippets Groups Projects
Commit 55947d27 authored by Dennis Mannhart's avatar Dennis Mannhart Committed by Daniel Agar
Browse files

exponentialFromLimits make small number const

parent be4900f6
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment