summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2017-04-05 11:36:55 +0200
committerStanislaw Halik <sthalik@misaki.pl>2017-04-06 04:29:51 +0200
commit812e483c2b15b4e521797af1310fc9d4dccee882 (patch)
tree3c9cc4e38ae5a0d21e0762f907eae47356e8df38
parentf84cf70bad3833d6860228a080673cfa24aa59d7 (diff)
tracker/steamvr: revert to asin formula
-rw-r--r--tracker-steamvr/steamvr.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/tracker-steamvr/steamvr.cpp b/tracker-steamvr/steamvr.cpp
index 7b75952e..901c4241 100644
--- a/tracker-steamvr/steamvr.cpp
+++ b/tracker-steamvr/steamvr.cpp
@@ -247,9 +247,12 @@ bool steamvr::center()
void steamvr::matrix_to_euler(double& yaw, double& pitch, double& roll, const vr::HmdMatrix34_t& result)
{
+ using std::atan2;
+ using std::asin;
+
yaw = atan2(result.m[2][0], result.m[0][0]);
pitch = atan2(result.m[1][1], result.m[1][2]);
- roll = atan2(result.m[1][1], result.m[0][1]);
+ roll = asin(result.m[1][0]);
}
steamvr_dialog::steamvr_dialog()