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

Unified Diff: ui/gfx/transform_unittest.cc

Issue 2971903005: Fix matrix interpolation between rotations of 180 degrees (Closed)
Patch Set: forgot to revert a corresponding unit test Created 3 years, 5 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 | « ui/gfx/geometry/quaternion_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/transform_unittest.cc
diff --git a/ui/gfx/transform_unittest.cc b/ui/gfx/transform_unittest.cc
index b1b880af0e01cd75d5046d87dc7e3f8412f70730..9824f2c9d9186b27ec6dea6e8339c9858d3b9c47 100644
--- a/ui/gfx/transform_unittest.cc
+++ b/ui/gfx/transform_unittest.cc
@@ -745,8 +745,13 @@ TEST(XFormTest, CanBlend180DegreeRotation) {
// A 180 degree rotation is exactly opposite on the sphere, therefore
// either great circle arc to it is equivalent (and numerical precision
// will determine which is closer). Test both directions.
- Transform expected = from;
- EXPECT_TRUE(MatricesAreNearlyEqual(expected, to))
+ Transform expected1;
+ expected1.RotateAbout(axes[index], 180.0 * t);
+ Transform expected2;
+ expected2.RotateAbout(axes[index], -180.0 * t);
+
+ EXPECT_TRUE(MatricesAreNearlyEqual(expected1, to) ||
+ MatricesAreNearlyEqual(expected2, to))
<< "axis: " << index << ", i: " << i;
}
}
« no previous file with comments | « ui/gfx/geometry/quaternion_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698