diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2016-02-23 15:23:29 -0500 |
---|---|---|
committer | Dan Sinclair <dsinclair@chromium.org> | 2016-02-23 15:23:29 -0500 |
commit | 2c8fad44315db58f5b3222161dcb699691dca904 (patch) | |
tree | 70e9bdf55e1e3197d8bd088abd103012b602e32f /third_party/agg23/agg_math.h | |
parent | 2886a25b68225ad3ad70d417b01108ad1d126488 (diff) | |
download | pdfium-2c8fad44315db58f5b3222161dcb699691dca904.tar.xz |
Remove FXSYS_Mul.
This define just multiples the two parameters together. Inline the *'s.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1729613003 .
Diffstat (limited to 'third_party/agg23/agg_math.h')
-rw-r--r-- | third_party/agg23/agg_math.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/third_party/agg23/agg_math.h b/third_party/agg23/agg_math.h index 31e0daf3bb..c0d9570aa9 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; } |