summaryrefslogtreecommitdiff
path: root/third_party/agg23/agg_math.h
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2016-02-23 16:31:44 -0500
committerDan Sinclair <dsinclair@chromium.org>2016-02-23 16:31:44 -0500
commit435604d371de48044ae6c1567479b34e0d93e298 (patch)
treede6a27714d545afc11d83283b79acb17477f5b7d /third_party/agg23/agg_math.h
parentaffe4b09575b297747e66bd0b807d2b1b04822fe (diff)
downloadpdfium-435604d371de48044ae6c1567479b34e0d93e298.tar.xz
Remove FXSYS_MulDiv(a, b, c).
This is a wrapper which does (a) * (b) / (c). Inline the operations. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1726893002 .
Diffstat (limited to 'third_party/agg23/agg_math.h')
-rw-r--r--third_party/agg23/agg_math.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/third_party/agg23/agg_math.h b/third_party/agg23/agg_math.h
index c0d9570aa9..e003297dff 100644
--- a/third_party/agg23/agg_math.h
+++ b/third_party/agg23/agg_math.h
@@ -44,7 +44,7 @@ AGG_INLINE FX_FLOAT calc_line_point_distance(FX_FLOAT x1, FX_FLOAT y1,
if(d < intersection_epsilon) {
return calc_distance(x1, y1, x, y);
}
- return FXSYS_MulDiv(x - x2, dy, d) - FXSYS_MulDiv(y - y2, dx, d);
+ return ((x - x2) * dy / d) - ((y - y2) * dx / d);
}
AGG_INLINE bool calc_intersection(FX_FLOAT ax, FX_FLOAT ay, FX_FLOAT bx, FX_FLOAT by,
FX_FLOAT cx, FX_FLOAT cy, FX_FLOAT dx, FX_FLOAT dy,
@@ -55,8 +55,8 @@ AGG_INLINE bool calc_intersection(FX_FLOAT ax, FX_FLOAT ay, FX_FLOAT bx, FX_FLOA
if (FXSYS_fabs(den) < intersection_epsilon) {
return false;
}
- *x = ax + FXSYS_MulDiv(bx - ax, num, den);
- *y = ay + FXSYS_MulDiv(by - ay, num, den);
+ *x = ax + ((bx - ax) * num / den);
+ *y = ay + ((by - ay) * num / den);
return true;
}
}