mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-16 05:43:34 +08:00
math Functions: replace float with T
This commit is contained in:
committed by
Daniel Agar
parent
be2e80c186
commit
80193cd227
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user