summaryrefslogtreecommitdiff
path: root/src/lib/evas/common/evas_map_image_internal_high.c
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2020-05-12 09:20:42 +0200
committerXavi Artigas <xavierartigas@yahoo.es>2020-05-12 16:10:02 +0200
commit235ba0e407ae1e14684da5d0d66641564d755ae2 (patch)
treea98d7c21177a71e72d47989ceec0c510cb6f4790 /src/lib/evas/common/evas_map_image_internal_high.c
parent6196311ad7e4f6ceacee0d56c97df06aab8e0995 (diff)
evas: resolve float compare warnings
Summary: Depends on D11792 Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D11793
Diffstat (limited to '')
-rw-r--r--src/lib/evas/common/evas_map_image_internal_high.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/evas/common/evas_map_image_internal_high.c b/src/lib/evas/common/evas_map_image_internal_high.c
index 040bab71ac..0b52eeace4 100644
--- a/src/lib/evas/common/evas_map_image_internal_high.c
+++ b/src/lib/evas/common/evas_map_image_internal_high.c
@@ -587,7 +587,7 @@ _map_triangle_draw(RGBA_Image *src, RGBA_Image *dst,
587 denom = ((x[2] - x[0]) * (y[1] - y[0]) - (x[1] - x[0]) * (y[2] - y[0])); 587 denom = ((x[2] - x[0]) * (y[1] - y[0]) - (x[1] - x[0]) * (y[2] - y[0]));
588 588
589 //Skip poly if it's an infinitely thin line 589 //Skip poly if it's an infinitely thin line
590 if (denom == 0) return; 590 if (EINA_DBL_EQ(denom, 0)) return;
591 591
592 denom = 1 / denom; //Reciprocal for speeding up 592 denom = 1 / denom; //Reciprocal for speeding up
593 dudx = ((u[2] - u[0]) * (y[1] - y[0]) - (u[1] - u[0]) * (y[2] - y[0])) * denom; 593 dudx = ((u[2] - u[0]) * (y[1] - y[0]) - (u[1] - u[0]) * (y[2] - y[0])) * denom;
@@ -619,8 +619,8 @@ _map_triangle_draw(RGBA_Image *src, RGBA_Image *dst,
619 //Determine which side of the polygon the longer edge is on 619 //Determine which side of the polygon the longer edge is on
620 side = (dxdy[1] > dxdy[0]) ? EINA_TRUE:EINA_FALSE; 620 side = (dxdy[1] > dxdy[0]) ? EINA_TRUE:EINA_FALSE;
621 621
622 if (y[0] == y[1]) side = x[0] > x[1]; 622 if (EINA_DBL_EQ(y[0], y[1])) side = x[0] > x[1];
623 if (y[1] == y[2]) side = x[2] > x[1]; 623 if (EINA_DBL_EQ(y[1], y[2])) side = x[2] > x[1];
624 624
625 //Longer edge is on the left side 625 //Longer edge is on the left side
626 if (!side) 626 if (!side)