diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2014-11-09 07:08:50 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2014-11-09 07:08:50 +0100 |
commit | 97f257e575e5de5557afdb0e1cd7a2c7492f56d2 (patch) | |
tree | 3e16a75dca1f446683bcca1c4ae23a3d4ac3fe4d | |
parent | 6e8543ca2888dfcc5f211375a5b44bb63ddb8442 (diff) |
Revert "fix typos"
This reverts commit e74f029bf790342b1d3e0f11e5edf98c16946b08.
-rw-r--r-- | ftnoir_tracker_pt/ftnoir_tracker_pt.cpp | 2 | ||||
-rw-r--r-- | opentrack/tracker.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/ftnoir_tracker_pt/ftnoir_tracker_pt.cpp b/ftnoir_tracker_pt/ftnoir_tracker_pt.cpp index a76fdb78..6248b225 100644 --- a/ftnoir_tracker_pt/ftnoir_tracker_pt.cpp +++ b/ftnoir_tracker_pt/ftnoir_tracker_pt.cpp @@ -175,7 +175,7 @@ void Tracker::data(THeadPoseData *data) // extract rotation angles float alpha, beta, gamma; - beta = atan( -R(2,0) / (sqrt(R(2,1)*R(2,1) + R(2,2)*R(2,2))) ); + beta = atan( -R(2,0) / sqrt(R(2,1)*R(2,1) + R(2,2)*R(2,2)) ); alpha = atan( R(1,0) / R(0,0)); gamma = atan( R(2,1) / R(2,2)); diff --git a/opentrack/tracker.cpp b/opentrack/tracker.cpp index e856b5b2..b464dffe 100644 --- a/opentrack/tracker.cpp +++ b/opentrack/tracker.cpp @@ -52,7 +52,7 @@ double Tracker::map(double pos, bool invertp, Mapping& axis) static dmat<3, 1> rmat_to_euler(const dmat<3, 3>& R) { // don't use atan2 here, confuses quadrants. see issue #63 -sh - double pitch = atan( -R(2,0) / (sqrt(R(2,1)*R(2,1) + R(2,2)*R(2,2))) ); + double pitch = atan( -R(0, 2) / sqrt(R(1,2)*R(1,2) + R(2,2)*R(2,2)) ); double roll = atan(R(1, 2) / R(2, 2)); double yaw = atan(R(0, 1) / R(0, 0)); return dmat<3, 1>({yaw, pitch, roll}); |