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

Unified Diff: include/core/SkPoint.h

Issue 132453008: remove SkScalarMul from public headers (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 11 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 | include/core/SkScalar.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkPoint.h
diff --git a/include/core/SkPoint.h b/include/core/SkPoint.h
index caf26507ffa3c5e632ceb078a6a3301d0c08c5eb..5dd331a14ca9b65ecef9d1fec10594ff01d565c0 100644
--- a/include/core/SkPoint.h
+++ b/include/core/SkPoint.h
@@ -411,13 +411,13 @@ struct SK_API SkPoint {
/** Returns the dot product of a and b, treating them as 2D vectors
*/
static SkScalar DotProduct(const SkPoint& a, const SkPoint& b) {
- return SkScalarMul(a.fX, b.fX) + SkScalarMul(a.fY, b.fY);
+ return a.fX * b.fX + a.fY * b.fY;
}
/** Returns the cross product of a and b, treating them as 2D vectors
*/
static SkScalar CrossProduct(const SkPoint& a, const SkPoint& b) {
- return SkScalarMul(a.fX, b.fY) - SkScalarMul(a.fY, b.fX);
+ return a.fX * b.fY - a.fY * b.fX;
}
SkScalar cross(const SkPoint& vec) const {
@@ -435,7 +435,7 @@ struct SK_API SkPoint {
SkScalar distanceToSqd(const SkPoint& pt) const {
SkScalar dx = fX - pt.fX;
SkScalar dy = fY - pt.fY;
- return SkScalarMul(dx, dx) + SkScalarMul(dy, dy);
+ return dx * dx + dy * dy;
}
/**
« no previous file with comments | « no previous file | include/core/SkScalar.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698