mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-17 06:17:35 +08:00
matrix: inline to prevent multiple definitions (#147)
Without inline we get multiple definitions during linking.
This commit is contained in:
@@ -65,7 +65,7 @@ Floating wrap_floating(Floating x, Floating low, Floating high) {
|
|||||||
* @param high upper limit of the allowed range
|
* @param high upper limit of the allowed range
|
||||||
* @return wrapped value inside the range
|
* @return wrapped value inside the range
|
||||||
*/
|
*/
|
||||||
float wrap(float x, float low, float high) {
|
inline float wrap(float x, float low, float high) {
|
||||||
return matrix::detail::wrap_floating(x, low, high);
|
return matrix::detail::wrap_floating(x, low, high);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -77,7 +77,7 @@ float wrap(float x, float low, float high) {
|
|||||||
* @param high upper limit of the allowed range
|
* @param high upper limit of the allowed range
|
||||||
* @return wrapped value inside the range
|
* @return wrapped value inside the range
|
||||||
*/
|
*/
|
||||||
double wrap(double x, double low, double high) {
|
inline double wrap(double x, double low, double high) {
|
||||||
return matrix::detail::wrap_floating(x, low, high);
|
return matrix::detail::wrap_floating(x, low, high);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user