From 552dad40a10b2240f24fa04c53e00aa78818c81d Mon Sep 17 00:00:00 2001 From: Pavel Kirienko Date: Fri, 17 Mar 2017 13:31:05 +0300 Subject: [PATCH] Fixed inclusions in matrix/ --- matrix/Matrix.hpp | 1 - matrix/Vector.hpp | 2 - matrix/helper_functions.hpp | 1 - matrix/math.hpp | 1 + matrix/stdlib_imports.hpp | 90 +++++++++++++++++++++++++++++++++++++ 5 files changed, 91 insertions(+), 4 deletions(-) create mode 100644 matrix/stdlib_imports.hpp diff --git a/matrix/Matrix.hpp b/matrix/Matrix.hpp index 0d3fd48e38..976ca83f71 100644 --- a/matrix/Matrix.hpp +++ b/matrix/Matrix.hpp @@ -8,7 +8,6 @@ #pragma once -#include #include #include diff --git a/matrix/Vector.hpp b/matrix/Vector.hpp index 9265b2a223..2fa0363400 100644 --- a/matrix/Vector.hpp +++ b/matrix/Vector.hpp @@ -8,8 +8,6 @@ #pragma once -#include - #include "math.hpp" namespace matrix diff --git a/matrix/helper_functions.hpp b/matrix/helper_functions.hpp index f501598f9b..e8cc0dcb80 100644 --- a/matrix/helper_functions.hpp +++ b/matrix/helper_functions.hpp @@ -1,7 +1,6 @@ #pragma once #include "math.hpp" -#include namespace matrix { diff --git a/matrix/math.hpp b/matrix/math.hpp index b69d2e0eec..342ae5e612 100644 --- a/matrix/math.hpp +++ b/matrix/math.hpp @@ -1,5 +1,6 @@ #pragma once +#include "stdlib_imports.hpp" #ifdef __PX4_QURT #include "dspal_math.h" #endif diff --git a/matrix/stdlib_imports.hpp b/matrix/stdlib_imports.hpp new file mode 100644 index 0000000000..c72b1fc3d5 --- /dev/null +++ b/matrix/stdlib_imports.hpp @@ -0,0 +1,90 @@ +/** + * @file stdlib_imports.hpp + * + * @author Pavel Kirienko + */ + +#pragma once + +#include +#include +#include + +namespace matrix { + +using std::abs; +using std::div; +using std::fabs; +using std::fmod; +using std::exp; +using std::log; +using std::log10; +using std::pow; +using std::sqrt; +using std::sin; +using std::cos; +using std::tan; +using std::asin; +using std::acos; +using std::atan; +using std::atan2; +using std::sinh; +using std::cosh; +using std::tanh; +using std::ceil; +using std::floor; +using std::frexp; +using std::ldexp; +using std::modf; +using std::fpclassify; +using std::isfinite; +using std::isinf; +using std::isnan; +using std::isnormal; +using std::signbit; +using std::isgreater; +using std::isgreaterequal; +using std::isless; +using std::islessequal; +using std::islessgreater; +using std::isunordered; + +#if __cplusplus >= 201103L + +using std::imaxabs; +using std::imaxdiv; +using std::remainder; +using std::remquo; +using std::fma; +using std::fmax; +using std::fmin; +using std::fdim; +using std::nan; +using std::nanf; +using std::nanl; +using std::exp2; +using std::expm1; +using std::log2; +using std::log1p; +using std::cbrt; +using std::hypot; +using std::asinh; +using std::acosh; +using std::atanh; +using std::erf; +using std::erfc; +using std::tgamma; +using std::lgamma; +using std::trunc; +using std::round; +using std::nearbyint; +using std::rint; +using std::scalbn; +using std::ilogb; +using std::logb; +using std::nextafter; +using std::copysign; + +#endif + +}