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

Unified Diff: cc/math_util.h

Issue 11366094: cc: Create a Region class that wraps SkRegion, to replace use of WebCore::Region. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 1 month 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 | « cc/layer_tree_host_unittest.cc ('k') | cc/math_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/math_util.h
diff --git a/cc/math_util.h b/cc/math_util.h
index 1caf6595c0a8483335ae6784c94e8d1bee567c68..fe1780042800f53800b9e8b1a19f2b2daf782644 100644
--- a/cc/math_util.h
+++ b/cc/math_util.h
@@ -67,6 +67,14 @@ struct HomogeneousCoordinate {
class CC_EXPORT MathUtil {
public:
+ static const double PI_DOUBLE;
+ static const float PI_FLOAT;
+
+ static double Deg2Rad(double deg) { return deg * PI_DOUBLE / 180; }
+ static double Rad2Deg(double rad) { return rad * 180 / PI_DOUBLE; }
+
+ static float Deg2Rad(float deg) { return deg * PI_FLOAT / 180; }
+ static float Rad2Deg(float rad) { return rad * 180 / PI_FLOAT; }
// Background: WebTransformationMatrix code in WebCore does not do the right thing in
// mapRect / mapQuad / projectQuad when there is a perspective projection that causes
« no previous file with comments | « cc/layer_tree_host_unittest.cc ('k') | cc/math_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698