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

Unified Diff: third_party/agg23/agg_math.h

Issue 1729613003: Remove FXSYS_Mul. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Rebase to master Created 4 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 | « third_party/agg23/agg_curves.cpp ('k') | third_party/agg23/agg_math_stroke.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/agg23/agg_math.h
diff --git a/third_party/agg23/agg_math.h b/third_party/agg23/agg_math.h
index 31e0daf3bb9a3de6bab012cf050c07bc19d99da3..c0d9570aa9e2e75fac26707423d5b64ff4d00d4a 100644
--- a/third_party/agg23/agg_math.h
+++ b/third_party/agg23/agg_math.h
@@ -26,7 +26,7 @@ AGG_INLINE FX_FLOAT calc_point_location(FX_FLOAT x1, FX_FLOAT y1,
FX_FLOAT x2, FX_FLOAT y2,
FX_FLOAT x, FX_FLOAT y)
{
- return FXSYS_Mul(x - x2, y2 - y1) - FXSYS_Mul(y - y2, x2 - x1);
+ return ((x - x2) * (y2 - y1)) - ((y - y2) * (x2 - x1));
}
AGG_INLINE FX_FLOAT calc_distance(FX_FLOAT x1, FX_FLOAT y1, FX_FLOAT x2, FX_FLOAT y2)
{
@@ -50,8 +50,8 @@ AGG_INLINE bool calc_intersection(FX_FLOAT ax, FX_FLOAT ay, FX_FLOAT bx, FX_FLOA
FX_FLOAT cx, FX_FLOAT cy, FX_FLOAT dx, FX_FLOAT dy,
FX_FLOAT* x, FX_FLOAT* y)
{
- FX_FLOAT num = FXSYS_Mul(ay - cy, dx - cx) - FXSYS_Mul(ax - cx, dy - cy);
- FX_FLOAT den = FXSYS_Mul(bx - ax, dy - cy) - FXSYS_Mul(by - ay, dx - cx);
+ FX_FLOAT num = ((ay - cy) * (dx - cx)) - ((ax - cx) * (dy - cy));
+ FX_FLOAT den = ((bx - ax) * (dy - cy)) - ((by - ay) * (dx - cx));
if (FXSYS_fabs(den) < intersection_epsilon) {
return false;
}
« no previous file with comments | « third_party/agg23/agg_curves.cpp ('k') | third_party/agg23/agg_math_stroke.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698