summaryrefslogtreecommitdiffhomepage
path: root/tracker-steamvr/steamvr.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2017-03-31 09:54:38 +0200
committerStanislaw Halik <sthalik@misaki.pl>2017-04-06 04:21:39 +0200
commitc8548534c6d4dc3049128c87c6f2332d94c66e43 (patch)
tree04e5d645054099e6f0435f466f9e777c5245b9d4 /tracker-steamvr/steamvr.cpp
parent1efa9efe5df2310afea1c10cc5f371461447fffa (diff)
tracker/steamvr: use atan2 rather than asin
Compute roll without a period of 90 deg. Submitted-by: @subnet-
Diffstat (limited to 'tracker-steamvr/steamvr.cpp')
-rw-r--r--tracker-steamvr/steamvr.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tracker-steamvr/steamvr.cpp b/tracker-steamvr/steamvr.cpp
index 303efd06..e40d51a1 100644
--- a/tracker-steamvr/steamvr.cpp
+++ b/tracker-steamvr/steamvr.cpp
@@ -133,7 +133,7 @@ void steamvr::data(double* data)
{
data[Yaw] = -atan2(-result.m[2][0], result.m[0][0]);
data[Pitch] = atan2(-result.m[1][2], result.m[1][1]);
- data[Roll] = asin(result.m[1][0]);
+ data[Roll] = atan2(result.m[1][1], result.m[0][1]);
}
static constexpr double r2d = 180 / M_PI;