summaryrefslogtreecommitdiff
path: root/src/lib/ector
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2016-12-20 10:59:55 -0500
committerChris Michael <cp.michael@samsung.com>2016-12-20 10:59:55 -0500
commit8ce2d991500300d466ff3572fcd60400083880d4 (patch)
treed3466d863b1771aeaf39691e36f504747c2bebe5 /src/lib/ector
parent7507efc2600bd65c0d61e0a072cf2fa25b6e4ae8 (diff)
ector: remove float comparison warnings
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Diffstat (limited to 'src/lib/ector')
-rw-r--r--src/lib/ector/software/ector_renderer_software_gradient_linear.c2
-rw-r--r--src/lib/ector/software/ector_renderer_software_gradient_radial.c4
-rw-r--r--src/lib/ector/software/ector_software_gradient.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/ector/software/ector_renderer_software_gradient_linear.c b/src/lib/ector/software/ector_renderer_software_gradient_linear.c
index 69bf9e42d9..616040239b 100644
--- a/src/lib/ector/software/ector_renderer_software_gradient_linear.c
+++ b/src/lib/ector/software/ector_renderer_software_gradient_linear.c
@@ -34,7 +34,7 @@ _ector_renderer_software_gradient_linear_ector_renderer_prepare(Eo *obj,
34 pd->linear.l = pd->linear.dx * pd->linear.dx + pd->linear.dy * pd->linear.dy; 34 pd->linear.l = pd->linear.dx * pd->linear.dx + pd->linear.dy * pd->linear.dy;
35 pd->linear.off = 0; 35 pd->linear.off = 0;
36 36
37 if (pd->linear.l != 0) 37 if (!EINA_DBL_CMP(pd->linear.l, 0.0))
38 { 38 {
39 pd->linear.dx /= pd->linear.l; 39 pd->linear.dx /= pd->linear.l;
40 pd->linear.dy /= pd->linear.l; 40 pd->linear.dy /= pd->linear.l;
diff --git a/src/lib/ector/software/ector_renderer_software_gradient_radial.c b/src/lib/ector/software/ector_renderer_software_gradient_radial.c
index 439f193c0b..a66df4f23a 100644
--- a/src/lib/ector/software/ector_renderer_software_gradient_radial.c
+++ b/src/lib/ector/software/ector_renderer_software_gradient_radial.c
@@ -26,12 +26,12 @@ _ector_renderer_software_gradient_radial_ector_renderer_prepare(Eo *obj, Ector_R
26 pd->radial.cy = pd->grd->radial.y; 26 pd->radial.cy = pd->grd->radial.y;
27 pd->radial.cradius = pd->grd->radius; 27 pd->radial.cradius = pd->grd->radius;
28 28
29 if (!pd->grd->focal.x) 29 if (EINA_DBL_CMP(pd->grd->focal.x, 0.0))
30 pd->radial.fx = pd->grd->radial.x; 30 pd->radial.fx = pd->grd->radial.x;
31 else 31 else
32 pd->radial.fx = pd->grd->focal.x; 32 pd->radial.fx = pd->grd->focal.x;
33 33
34 if (!pd->grd->focal.y) 34 if (EINA_DBL_CMP(pd->grd->focal.y, 0.0))
35 pd->radial.fy = pd->grd->radial.y; 35 pd->radial.fy = pd->grd->radial.y;
36 else 36 else
37 pd->radial.fy = pd->grd->focal.y; 37 pd->radial.fy = pd->grd->focal.y;
diff --git a/src/lib/ector/software/ector_software_gradient.c b/src/lib/ector/software/ector_software_gradient.c
index ea1b4a2295..5f63fca277 100644
--- a/src/lib/ector/software/ector_software_gradient.c
+++ b/src/lib/ector/software/ector_software_gradient.c
@@ -386,7 +386,7 @@ fetch_linear_gradient(uint32_t *buffer, Span_Data *data, int y, int x, int lengt
386 uint32_t *end; 386 uint32_t *end;
387 int t_fixed, inc_fixed; 387 int t_fixed, inc_fixed;
388 388
389 if (g_data->linear.l == 0) 389 if (EINA_DBL_CMP(g_data->linear.l, 0.0))
390 { 390 {
391 t = inc = 0; 391 t = inc = 0;
392 } 392 }