summaryrefslogtreecommitdiffhomepage
path: root/compat/euler.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2017-07-16 16:57:59 +0200
committerStanislaw Halik <sthalik@misaki.pl>2017-07-16 16:57:59 +0200
commite016dca372bf69f3bb4967a8aba374bc04aea3b4 (patch)
tree73249375dc7a666acee8c7349e56c095cd6e4369 /compat/euler.cpp
parent1ac33e5d5aea97448c71ea58b12492ae219e88f1 (diff)
compat/math-imports: use it
Diffstat (limited to 'compat/euler.cpp')
-rw-r--r--compat/euler.cpp10
1 files changed, 1 insertions, 9 deletions
diff --git a/compat/euler.cpp b/compat/euler.cpp
index f02365c9..a868478e 100644
--- a/compat/euler.cpp
+++ b/compat/euler.cpp
@@ -1,13 +1,11 @@
#include "euler.hpp"
+#include "math-imports.hpp"
#include <cmath>
namespace euler {
euler_t OTR_COMPAT_EXPORT rmat_to_euler(const rmat& R)
{
- using std::atan2;
- using std::sqrt;
-
const double cy = sqrt(R(2,2)*R(2, 2) + R(2, 1)*R(2, 1));
const bool large_enough = cy > 1e-10;
if (large_enough)
@@ -31,9 +29,6 @@ rmat OTR_COMPAT_EXPORT euler_to_rmat(const euler_t& input)
const double P = -input(1);
const double B = -input(2);
- using std::cos;
- using std::sin;
-
const auto c1 = cos(H);
const auto s1 = sin(H);
const auto c2 = cos(P);
@@ -63,9 +58,6 @@ void OTR_COMPAT_EXPORT tait_bryan_to_matrices(const euler_t& input,
rmat& r_pitch,
rmat& r_yaw)
{
- using std::cos;
- using std::sin;
-
{
const double phi = -input(2);
const double sin_phi = sin(phi);