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

Unified Diff: Source/platform/transforms/AffineTransform.cpp

Issue 170453004: Add constant twoPiDouble/twoPiFloat to MathExtras.h (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: add constant values to header Created 6 years, 10 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 | « Source/platform/graphics/filters/FEGaussianBlur.cpp ('k') | Source/wtf/MathExtras.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/transforms/AffineTransform.cpp
diff --git a/Source/platform/transforms/AffineTransform.cpp b/Source/platform/transforms/AffineTransform.cpp
index 44517294e4dadca823d55a9f4211f5c872bee1b1..33eb7aa379358969bc8b26e2b38e9e1adb543408 100644
--- a/Source/platform/transforms/AffineTransform.cpp
+++ b/Source/platform/transforms/AffineTransform.cpp
@@ -322,14 +322,14 @@ void AffineTransform::blend(const AffineTransform& from, double progress)
}
// Don't rotate the long way around.
- srA.angle = fmod(srA.angle, 2 * piDouble);
- srB.angle = fmod(srB.angle, 2 * piDouble);
+ srA.angle = fmod(srA.angle, twoPiDouble);
+ srB.angle = fmod(srB.angle, twoPiDouble);
if (fabs(srA.angle - srB.angle) > piDouble) {
if (srA.angle > srB.angle)
- srA.angle -= piDouble * 2;
+ srA.angle -= twoPiDouble;
else
- srB.angle -= piDouble * 2;
+ srB.angle -= twoPiDouble;
}
srA.scaleX += progress * (srB.scaleX - srA.scaleX);
« no previous file with comments | « Source/platform/graphics/filters/FEGaussianBlur.cpp ('k') | Source/wtf/MathExtras.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698