summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas/evas_canvas3d_mesh.c
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2016-12-20 10:21:16 -0500
committerChris Michael <cp.michael@samsung.com>2016-12-20 10:25:51 -0500
commit239d1401db0457fd8d238e99e522c39d55fd92fd (patch)
treee3c66c3220fa4d95ed3ed669c42396feee047c06 /src/lib/evas/canvas/evas_canvas3d_mesh.c
parent9a06230b8dff4b3802fe05446db4151bf53e8c81 (diff)
evas: remove float comparison warnings for evas_canvas3d_mesh
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Diffstat (limited to 'src/lib/evas/canvas/evas_canvas3d_mesh.c')
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_mesh.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/lib/evas/canvas/evas_canvas3d_mesh.c b/src/lib/evas/canvas/evas_canvas3d_mesh.c
index d9e5b68..98647a5 100644
--- a/src/lib/evas/canvas/evas_canvas3d_mesh.c
+++ b/src/lib/evas/canvas/evas_canvas3d_mesh.c
@@ -832,7 +832,8 @@ EOLIAN static void
832_evas_canvas3d_mesh_alpha_func_set(Eo *obj, Evas_Canvas3D_Mesh_Data *pd, Evas_Canvas3D_Comparison comparison, 832_evas_canvas3d_mesh_alpha_func_set(Eo *obj, Evas_Canvas3D_Mesh_Data *pd, Evas_Canvas3D_Comparison comparison,
833 Evas_Real ref_value) 833 Evas_Real ref_value)
834{ 834{
835 if (pd->alpha_comparison == comparison && pd->alpha_ref_value == ref_value) 835 if (pd->alpha_comparison == comparison &&
836 (EINA_DBL_CMP(pd->alpha_ref_value, ref_value)))
836 return; 837 return;
837 pd->alpha_comparison = comparison; 838 pd->alpha_comparison = comparison;
838 pd->alpha_ref_value = ref_value; 839 pd->alpha_ref_value = ref_value;
@@ -933,7 +934,7 @@ evas_canvas3d_mesh_interpolate_position_get(Eina_Vector3 *out, const Evas_Canvas
933 { 934 {
934 float *ptr; 935 float *ptr;
935 936
936 if (pos0->stride != 0.0) 937 if (!EINA_FLT_CMP(pos0->stride, 0.0))
937 ptr = (float *)((char *)pos0->data + pos0->stride * index); 938 ptr = (float *)((char *)pos0->data + pos0->stride * index);
938 else 939 else
939 ptr = (float *)pos0->data + 3 * index; 940 ptr = (float *)pos0->data + 3 * index;
@@ -946,12 +947,12 @@ evas_canvas3d_mesh_interpolate_position_get(Eina_Vector3 *out, const Evas_Canvas
946 { 947 {
947 float *ptr0, *ptr1; 948 float *ptr0, *ptr1;
948 949
949 if (pos0->stride != 0.0) 950 if (!EINA_FLT_CMP(pos0->stride, 0.0))
950 ptr0 = (float *)((char *)pos0->data + pos0->stride * index); 951 ptr0 = (float *)((char *)pos0->data + pos0->stride * index);
951 else 952 else
952 ptr0 = (float *)pos0->data + 3 * index; 953 ptr0 = (float *)pos0->data + 3 * index;
953 954
954 if (pos1->stride != 0.0) 955 if (!EINA_FLT_CMP(pos1->stride, 0.0))
955 ptr1 = (float *)((char *)pos1->data + pos1->stride * index); 956 ptr1 = (float *)((char *)pos1->data + pos1->stride * index);
956 else 957 else
957 ptr1 = (float *)pos1->data + 3 * index; 958 ptr1 = (float *)pos1->data + 3 * index;
@@ -1115,7 +1116,7 @@ EOLIAN static void
1115_evas_canvas3d_mesh_shadows_constant_bias_set(Eo *obj EINA_UNUSED, Evas_Canvas3D_Mesh_Data *pd, 1116_evas_canvas3d_mesh_shadows_constant_bias_set(Eo *obj EINA_UNUSED, Evas_Canvas3D_Mesh_Data *pd,
1116 Evas_Real bias) 1117 Evas_Real bias)
1117{ 1118{
1118 if (pd->shadows_constant_bias != bias) 1119 if (!EINA_DBL_CMP(pd->shadows_constant_bias, bias))
1119 { 1120 {
1120 pd->shadows_constant_bias = bias; 1121 pd->shadows_constant_bias = bias;
1121 evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_MESH_SHADOWS_CONSTANT_BIAS, NULL); 1122 evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_MESH_SHADOWS_CONSTANT_BIAS, NULL);