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

Unified Diff: Source/wtf/MathExtras.h

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/transforms/AffineTransform.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/wtf/MathExtras.h
diff --git a/Source/wtf/MathExtras.h b/Source/wtf/MathExtras.h
index 1b97859b4bf60691f79079063a77b43be55cccff..c4945061e8d2f732a22e99cb69b4b6ce88faf839 100644
--- a/Source/wtf/MathExtras.h
+++ b/Source/wtf/MathExtras.h
@@ -49,6 +49,9 @@ const float piOverTwoFloat = static_cast<float>(M_PI_2);
const double piOverFourDouble = M_PI_4;
const float piOverFourFloat = static_cast<float>(M_PI_4);
+const double twoPiDouble = piDouble * 2.0;
+const float twoPiFloat = piFloat * 2.0f;
+
#if OS(MACOSX)
// Work around a bug in the Mac OS X libc where ceil(-0.1) return +0.
« no previous file with comments | « Source/platform/transforms/AffineTransform.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698