summaryrefslogtreecommitdiff
path: root/third_party/agg23/agg_curves.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2016-02-23 15:23:29 -0500
committerDan Sinclair <dsinclair@chromium.org>2016-02-23 15:23:29 -0500
commit2c8fad44315db58f5b3222161dcb699691dca904 (patch)
tree70e9bdf55e1e3197d8bd088abd103012b602e32f /third_party/agg23/agg_curves.cpp
parent2886a25b68225ad3ad70d417b01108ad1d126488 (diff)
downloadpdfium-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_curves.cpp')
-rw-r--r--third_party/agg23/agg_curves.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/third_party/agg23/agg_curves.cpp b/third_party/agg23/agg_curves.cpp
index e19221d33e..21b959dc97 100644
--- a/third_party/agg23/agg_curves.cpp
+++ b/third_party/agg23/agg_curves.cpp
@@ -61,8 +61,8 @@ void curve4_div::recursive_bezier(FX_FLOAT x1, FX_FLOAT y1,
FX_FLOAT y1234 = (y123 + y234) / 2;
FX_FLOAT dx = x4 - x1;
FX_FLOAT dy = y4 - y1;
- FX_FLOAT d2 = FXSYS_fabs(FXSYS_Mul(x2 - x4, dy) - FXSYS_Mul(y2 - y4, dx));
- FX_FLOAT d3 = FXSYS_fabs(FXSYS_Mul(x3 - x4, dy) - FXSYS_Mul(y3 - y4, dx));
+ FX_FLOAT d2 = FXSYS_fabs(((x2 - x4) * dy) - ((y2 - y4) * dx));
+ FX_FLOAT d3 = FXSYS_fabs(((x3 - x4) * dy) - ((y3 - y4) * dx));
switch((int(d2 > curve_collinearity_epsilon) << 1) +
int(d3 > curve_collinearity_epsilon)) {
case 0:
@@ -75,22 +75,22 @@ void curve4_div::recursive_bezier(FX_FLOAT x1, FX_FLOAT y1,
}
break;
case 1:
- if(FXSYS_Mul(d3, d3) <= FXSYS_Mul(m_distance_tolerance_square,
- FXSYS_Mul(dx, dx) + FXSYS_Mul(dy, dy))) {
+ if ((d3 * d3) <=
+ (m_distance_tolerance_square * ((dx * dx) + (dy * dy)))) {
m_points.add(point_type(x23, y23, path_flags_jr));
return;
}
break;
case 2:
- if(FXSYS_Mul(d2, d2) <= FXSYS_Mul(m_distance_tolerance_square,
- FXSYS_Mul(dx, dx) + FXSYS_Mul(dy, dy))) {
+ if ((d2 * d2) <=
+ (m_distance_tolerance_square * ((dx * dx) + (dy * dy)))) {
m_points.add(point_type(x23, y23, path_flags_jr));
return;
}
break;
case 3:
- if(FXSYS_Mul(d2 + d3, d2 + d3) <= FXSYS_Mul(m_distance_tolerance_square,
- FXSYS_Mul(dx, dx) + FXSYS_Mul(dy, dy))) {
+ if (((d2 + d3) * (d2 + d3)) <=
+ (m_distance_tolerance_square * ((dx * dx) + (dy * dy)))) {
m_points.add(point_type(x23, y23, path_flags_jr));
return;
}