Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(335)

Unified Diff: device/vr/android/gvr/gvr_delegate.cc

Issue 2947843003: WebVR: fix angular velocity calculation for headset (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/vr/android/gvr/gvr_delegate.cc
diff --git a/device/vr/android/gvr/gvr_delegate.cc b/device/vr/android/gvr/gvr_delegate.cc
index 60d0bb0923070e30183476bedd2c074e4b4c68f0..6151bdef7e3929cefad1ba515a9367d9fb7ed0b4 100644
--- a/device/vr/android/gvr/gvr_delegate.cc
+++ b/device/vr/android/gvr/gvr_delegate.cc
@@ -66,9 +66,10 @@ gfx::Vector3dF GetAngularVelocityFromPoses(gfx::Transform head_mat,
// provided by the caller.
for (int j = 0; j < 3; ++j) {
for (int i = 0; i < 3; ++i) {
- delta_mat.matrix().set(j, i,
- head_mat_2.matrix().get(j, i) -
- head_mat.matrix().get(j, i) / epsilon_seconds);
+ delta_mat.matrix().set(
+ j, i,
+ (head_mat_2.matrix().get(j, i) - head_mat.matrix().get(j, i)) /
+ epsilon_seconds);
inverse_head_mat.matrix().set(j, i, head_mat.matrix().get(i, j));
}
delta_mat.matrix().set(j, 3, 0);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698