Browse Source

AP_Math: esp32 with esp_idf have MIN and MAX defined to something else.

Author: Charles Villard <charlesvillard10@gmail.com>
Author: Buzz <davidbuzz@gmail.com>
gps-1.3.1
Buzz 3 years ago committed by Andrew Tridgell
parent
commit
adaccdf0ba
  1. 2
      libraries/AP_Math/AP_Math.h

2
libraries/AP_Math/AP_Math.h

@ -215,12 +215,14 @@ ftype norm(const T first, const U second, const Params... parameters) @@ -215,12 +215,14 @@ ftype norm(const T first, const U second, const Params... parameters)
return sqrtF(sq(first, second, parameters...));
}
#undef MIN
template<typename A, typename B>
static inline auto MIN(const A &one, const B &two) -> decltype(one < two ? one : two)
{
return one < two ? one : two;
}
#undef MAX
template<typename A, typename B>
static inline auto MAX(const A &one, const B &two) -> decltype(one > two ? one : two)
{

Loading…
Cancel
Save