summaryrefslogtreecommitdiffhomepage
path: root/opentrack
diff options
context:
space:
mode:
Diffstat (limited to 'opentrack')
-rw-r--r--opentrack/simple-mat.cpp30
1 files changed, 14 insertions, 16 deletions
diff --git a/opentrack/simple-mat.cpp b/opentrack/simple-mat.cpp
index b9273fc0..6a5421c1 100644
--- a/opentrack/simple-mat.cpp
+++ b/opentrack/simple-mat.cpp
@@ -43,22 +43,20 @@ rmat euler_to_rmat(const double* input)
const auto c3 = cos(B);
const auto s3 = sin(B);
- double foo[] = {
- // z
- c1 * c2,
- c1 * s2 * s3 - c3 * s1,
- s1 * s3 + c1 * c3 * s2,
- // y
- c2 * s1,
- c1 * c3 + s1 * s2 * s3,
- c3 * s1 * s2 - c1 * s3,
- // x
- -s2,
- c2 * s3,
- c2 * c3
- };
-
- return dmat<3, 3>(foo);
+ return dmat<3, 3>(
+ // z
+ c1 * c2,
+ c1 * s2 * s3 - c3 * s1,
+ s1 * s3 + c1 * c3 * s2,
+ // y
+ c2 * s1,
+ c1 * c3 + s1 * s2 * s3,
+ c3 * s1 * s2 - c1 * s3,
+ // x
+ -s2,
+ c2 * s3,
+ c2 * c3
+ );
}
} // end ns euler