summaryrefslogtreecommitdiffhomepage
path: root/opentrack
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2016-07-22 10:09:41 +0200
committerStanislaw Halik <sthalik@misaki.pl>2016-07-23 11:05:33 +0200
commit8d428560bbcf2d5b96df406e3c6b7c5830571058 (patch)
tree5f52ff8d42241ed3733695bd1d9bcf781a86d39b /opentrack
parent256b5d2204bcae3db62c86cdf4774bdaa448c6b8 (diff)
logic, api: switch euler to use euler_t input. adjust usages.
Diffstat (limited to 'opentrack')
-rw-r--r--opentrack/simple-mat.cpp8
-rw-r--r--opentrack/simple-mat.hpp2
2 files changed, 5 insertions, 5 deletions
diff --git a/opentrack/simple-mat.cpp b/opentrack/simple-mat.cpp
index 6a5421c1..ed372299 100644
--- a/opentrack/simple-mat.cpp
+++ b/opentrack/simple-mat.cpp
@@ -30,11 +30,11 @@ euler_t rmat_to_euler(const dmat<3, 3>& R)
}
// tait-bryan angles, not euler
-rmat euler_to_rmat(const double* input)
+rmat euler_to_rmat(const euler_t input)
{
- const double H = input[0];
- const double P = input[1];
- const double B = input[2];
+ const double H = input(0);
+ const double P = input(1);
+ const double B = input(2);
const auto c1 = cos(H);
const auto s1 = sin(H);
diff --git a/opentrack/simple-mat.hpp b/opentrack/simple-mat.hpp
index 04cd38ee..93d0d0c9 100644
--- a/opentrack/simple-mat.hpp
+++ b/opentrack/simple-mat.hpp
@@ -268,7 +268,7 @@ template<int y, int x> using dmat = Mat<double, y, x>;
using rmat = dmat<3, 3>;
using euler_t = dmat<3, 1>;
-rmat OPENTRACK_API_EXPORT euler_to_rmat(const double* input);
+rmat OPENTRACK_API_EXPORT euler_to_rmat(const euler_t input);
// http://stackoverflow.com/a/18436193
euler_t OPENTRACK_API_EXPORT rmat_to_euler(const dmat<3, 3>& R);