summaryrefslogtreecommitdiff
path: root/src/lib/evas/include/evas_3d_utils.h
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2017-01-06 09:57:46 -0800
committerCedric BAIL <cedric@osg.samsung.com>2017-01-06 15:58:46 -0800
commit8f1c071d6adbf6f8e2002eeeabdc7f3d7be9ef22 (patch)
tree17bddaa85bcdead8807053b009d1adf1c9eda71c /src/lib/evas/include/evas_3d_utils.h
parentf9928b75c8c4a2e6c3f02aafb68c8a569a47ab04 (diff)
eina: rename EINA_{FLT,DBL}_CMP to EINA_{FLT,DBL}_EQ.
Diffstat (limited to 'src/lib/evas/include/evas_3d_utils.h')
-rw-r--r--src/lib/evas/include/evas_3d_utils.h108
1 files changed, 54 insertions, 54 deletions
diff --git a/src/lib/evas/include/evas_3d_utils.h b/src/lib/evas/include/evas_3d_utils.h
index 6d3155ab6a..af5f00e31e 100644
--- a/src/lib/evas/include/evas_3d_utils.h
+++ b/src/lib/evas/include/evas_3d_utils.h
@@ -84,11 +84,11 @@ evas_triangle3_is_line(Evas_Triangle3 *v)
84static inline Eina_Bool 84static inline Eina_Bool
85convex_hull_triangle3_not_first_edje(Evas_Triangle3 *v, Eina_Vector3 *a, Eina_Vector3 *b) 85convex_hull_triangle3_not_first_edje(Evas_Triangle3 *v, Eina_Vector3 *a, Eina_Vector3 *b)
86{ 86{
87 if ((EINA_DBL_CMP(v->p1.x, a->x) && EINA_DBL_CMP(v->p1.y, a->y) && EINA_DBL_CMP(v->p1.z, a->z)) && 87 if ((EINA_DBL_EQ(v->p1.x, a->x) && EINA_DBL_EQ(v->p1.y, a->y) && EINA_DBL_EQ(v->p1.z, a->z)) &&
88 (EINA_DBL_CMP(v->p2.x, b->x) && EINA_DBL_CMP(v->p2.y, b->y) && EINA_DBL_CMP(v->p2.z, b->z))) 88 (EINA_DBL_EQ(v->p2.x, b->x) && EINA_DBL_EQ(v->p2.y, b->y) && EINA_DBL_EQ(v->p2.z, b->z)))
89 return EINA_TRUE; 89 return EINA_TRUE;
90 else if ((EINA_DBL_CMP(v->p2.x, a->x) && EINA_DBL_CMP(v->p2.y, a->y) && EINA_DBL_CMP(v->p2.z, a->z)) && 90 else if ((EINA_DBL_EQ(v->p2.x, a->x) && EINA_DBL_EQ(v->p2.y, a->y) && EINA_DBL_EQ(v->p2.z, a->z)) &&
91 (EINA_DBL_CMP(v->p1.x, b->x) && EINA_DBL_CMP(v->p1.y, b->y) && EINA_DBL_CMP(v->p1.z, b->z))) 91 (EINA_DBL_EQ(v->p1.x, b->x) && EINA_DBL_EQ(v->p1.y, b->y) && EINA_DBL_EQ(v->p1.z, b->z)))
92 return EINA_TRUE; 92 return EINA_TRUE;
93 93
94 return EINA_FALSE; 94 return EINA_FALSE;
@@ -97,13 +97,13 @@ convex_hull_triangle3_not_first_edje(Evas_Triangle3 *v, Eina_Vector3 *a, Eina_Ve
97static inline Eina_Bool 97static inline Eina_Bool
98convex_hull_triangle3_first_edje(Evas_Triangle3 *v, Eina_Vector3 *a, Eina_Vector3 *b) 98convex_hull_triangle3_first_edje(Evas_Triangle3 *v, Eina_Vector3 *a, Eina_Vector3 *b)
99{ 99{
100 if ((!EINA_FLT_CMP(v->p0.x, a->x) && !EINA_FLT_CMP(v->p0.y, a->y) && 100 if ((!EINA_FLT_EQ(v->p0.x, a->x) && !EINA_FLT_EQ(v->p0.y, a->y) &&
101 !EINA_FLT_CMP(v->p0.z, a->z)) && (!EINA_FLT_CMP(v->p1.x, b->x) && 101 !EINA_FLT_EQ(v->p0.z, a->z)) && (!EINA_FLT_EQ(v->p1.x, b->x) &&
102 !EINA_FLT_CMP(v->p1.y, b->y) && !EINA_FLT_CMP(v->p1.z, b->z))) 102 !EINA_FLT_EQ(v->p1.y, b->y) && !EINA_FLT_EQ(v->p1.z, b->z)))
103 return EINA_TRUE; 103 return EINA_TRUE;
104 else if ((!EINA_FLT_CMP(v->p1.x, a->x) && !EINA_FLT_CMP(v->p1.y, a->y) && 104 else if ((!EINA_FLT_EQ(v->p1.x, a->x) && !EINA_FLT_EQ(v->p1.y, a->y) &&
105 !EINA_FLT_CMP(v->p1.z, a->z)) && (!EINA_FLT_CMP(v->p0.x, b->x) && 105 !EINA_FLT_EQ(v->p1.z, a->z)) && (!EINA_FLT_EQ(v->p0.x, b->x) &&
106 !EINA_FLT_CMP(v->p0.y, b->y) && !EINA_FLT_CMP(v->p0.z, b->z))) 106 !EINA_FLT_EQ(v->p0.y, b->y) && !EINA_FLT_EQ(v->p0.z, b->z)))
107 return EINA_TRUE; 107 return EINA_TRUE;
108 108
109 return EINA_FALSE; 109 return EINA_FALSE;
@@ -112,16 +112,16 @@ convex_hull_triangle3_first_edje(Evas_Triangle3 *v, Eina_Vector3 *a, Eina_Vector
112static inline Eina_Bool 112static inline Eina_Bool
113convex_hull_triangle3_first_point(Evas_Triangle3 *v, Eina_Vector3 *a) 113convex_hull_triangle3_first_point(Evas_Triangle3 *v, Eina_Vector3 *a)
114{ 114{
115 return (EINA_DBL_CMP(v->p0.x, a->x) && EINA_DBL_CMP(v->p0.y, a->y) && EINA_DBL_CMP(v->p0.z, a->z)); 115 return (EINA_DBL_EQ(v->p0.x, a->x) && EINA_DBL_EQ(v->p0.y, a->y) && EINA_DBL_EQ(v->p0.z, a->z));
116} 116}
117 117
118static inline Eina_Bool 118static inline Eina_Bool
119eina_vector3_equivalent_as_triangle(Eina_Vector3 *v0, Eina_Vector3 *v1, Eina_Vector3 *v2, 119eina_vector3_equivalent_as_triangle(Eina_Vector3 *v0, Eina_Vector3 *v1, Eina_Vector3 *v2,
120 Eina_Vector3 *w0, Eina_Vector3 *w1, Eina_Vector3 *w2) 120 Eina_Vector3 *w0, Eina_Vector3 *w1, Eina_Vector3 *w2)
121{ 121{
122 if ((EINA_DBL_CMP(v0->x, w0->x) && EINA_DBL_CMP(v0->y, w0->y) && EINA_DBL_CMP(v0->z, w0->z)) && 122 if ((EINA_DBL_EQ(v0->x, w0->x) && EINA_DBL_EQ(v0->y, w0->y) && EINA_DBL_EQ(v0->z, w0->z)) &&
123 (EINA_DBL_CMP(v1->x, w1->x) && EINA_DBL_CMP(v1->y, w1->y) && EINA_DBL_CMP(v1->z, w1->z)) && 123 (EINA_DBL_EQ(v1->x, w1->x) && EINA_DBL_EQ(v1->y, w1->y) && EINA_DBL_EQ(v1->z, w1->z)) &&
124 (EINA_DBL_CMP(v2->x, w2->x) && EINA_DBL_CMP(v2->y, w2->y) && EINA_DBL_CMP(v2->z, w2->z))) 124 (EINA_DBL_EQ(v2->x, w2->x) && EINA_DBL_EQ(v2->y, w2->y) && EINA_DBL_EQ(v2->z, w2->z)))
125 return EINA_TRUE; 125 return EINA_TRUE;
126 126
127 return EINA_FALSE; 127 return EINA_FALSE;
@@ -437,7 +437,7 @@ evas_box2_intersect_2d(const Evas_Box2 *box, const Eina_Vector2 *org, const Eina
437 return EINA_TRUE; 437 return EINA_TRUE;
438 } 438 }
439 /* minmax algorithm of ray and box intersection */ 439 /* minmax algorithm of ray and box intersection */
440 if (!EINA_DBL_CMP(dir->x, 0.0) && !EINA_DBL_CMP(dir->y, 0.0)) 440 if (!EINA_DBL_EQ(dir->x, 0.0) && !EINA_DBL_EQ(dir->y, 0.0))
441 { 441 {
442 t1 = (box->p0.x - org->x) / dir->x; 442 t1 = (box->p0.x - org->x) / dir->x;
443 t2 = (box->p1.x - org->x) / dir->x; 443 t2 = (box->p1.x - org->x) / dir->x;
@@ -472,7 +472,7 @@ evas_box2_intersect_2d(const Evas_Box2 *box, const Eina_Vector2 *org, const Eina
472 return EINA_FALSE; 472 return EINA_FALSE;
473 } 473 }
474 /* case when ray is parallel to one of axes */ 474 /* case when ray is parallel to one of axes */
475 else if (EINA_DBL_CMP(dir->x, 0.0)) 475 else if (EINA_DBL_EQ(dir->x, 0.0))
476 { 476 {
477 if ((org->x < box->p0.x) && (org->x > box->p1.x)) 477 if ((org->x < box->p0.x) && (org->x > box->p1.x))
478 return EINA_FALSE; 478 return EINA_FALSE;
@@ -511,7 +511,7 @@ evas_box3_ray3_intersect(const Evas_Box3 *box, const Evas_Ray3 *ray)
511 return EINA_TRUE; 511 return EINA_TRUE;
512 } 512 }
513 /* minmax algorithm of ray and box intersection */ 513 /* minmax algorithm of ray and box intersection */
514 if (!EINA_DBL_CMP(ray->dir.x, 0.0) && !EINA_DBL_CMP(ray->dir.y, 0.0) && !EINA_DBL_CMP(ray->dir.z, 0.0)) 514 if (!EINA_DBL_EQ(ray->dir.x, 0.0) && !EINA_DBL_EQ(ray->dir.y, 0.0) && !EINA_DBL_EQ(ray->dir.z, 0.0))
515 { 515 {
516 t1 = (box->p0.x - ray->org.x) / ray->dir.x; 516 t1 = (box->p0.x - ray->org.x) / ray->dir.x;
517 t2 = (box->p1.x - ray->org.x) / ray->dir.x; 517 t2 = (box->p1.x - ray->org.x) / ray->dir.x;
@@ -567,7 +567,7 @@ evas_box3_ray3_intersect(const Evas_Box3 *box, const Evas_Ray3 *ray)
567 else 567 else
568 { 568 {
569 /* use two-dimensional version here */ 569 /* use two-dimensional version here */
570 if (EINA_DBL_CMP(ray->dir.x, 0.0)) 570 if (EINA_DBL_EQ(ray->dir.x, 0.0))
571 { 571 {
572 if ((ray->org.x < box->p0.x) || (ray->org.x > box->p1.x)) 572 if ((ray->org.x < box->p0.x) || (ray->org.x > box->p1.x))
573 return EINA_FALSE; 573 return EINA_FALSE;
@@ -580,7 +580,7 @@ evas_box3_ray3_intersect(const Evas_Box3 *box, const Evas_Ray3 *ray)
580 } 580 }
581 } 581 }
582 582
583 if (EINA_DBL_CMP(ray->dir.y, 0.0)) 583 if (EINA_DBL_EQ(ray->dir.y, 0.0))
584 { 584 {
585 if ((ray->org.y < box->p0.y) || (ray->org.y > box->p1.y)) 585 if ((ray->org.y < box->p0.y) || (ray->org.y > box->p1.y))
586 return EINA_FALSE; 586 return EINA_FALSE;
@@ -593,7 +593,7 @@ evas_box3_ray3_intersect(const Evas_Box3 *box, const Evas_Ray3 *ray)
593 } 593 }
594 } 594 }
595 595
596 if (EINA_DBL_CMP(ray->dir.z, 0.0)) 596 if (EINA_DBL_EQ(ray->dir.z, 0.0))
597 { 597 {
598 if (ray->org.z < box->p0.z || ray->org.z > box->p1.z) 598 if (ray->org.z < box->p0.z || ray->org.z > box->p1.z)
599 return EINA_FALSE; 599 return EINA_FALSE;
@@ -672,11 +672,11 @@ evas_intersection_line_of_two_plains(Evas_Line3 *line, Eina_Quaternion *plane1,
672 line->point.y = (plane2->w * plane1->z - plane1->w * plane2->z) / line->direction.x; \ 672 line->point.y = (plane2->w * plane1->z - plane1->w * plane2->z) / line->direction.x; \
673 line->point.z = (plane2->y * plane1->w - plane1->y * plane2->w) / line->direction.x; 673 line->point.z = (plane2->y * plane1->w - plane1->y * plane2->w) / line->direction.x;
674 674
675 if (!EINA_DBL_CMP(line->direction.x, 0.0) && !EINA_DBL_CMP(plane1->z, 0.0)) 675 if (!EINA_DBL_EQ(line->direction.x, 0.0) && !EINA_DBL_EQ(plane1->z, 0.0))
676 { 676 {
677 SOLVE_EQUATION(x, y, z) 677 SOLVE_EQUATION(x, y, z)
678 } 678 }
679 else if (!EINA_DBL_CMP(line->direction.y, 0.0) && !EINA_DBL_CMP(plane1->x, 0.0)) 679 else if (!EINA_DBL_EQ(line->direction.y, 0.0) && !EINA_DBL_EQ(plane1->x, 0.0))
680 { 680 {
681 SOLVE_EQUATION(y, z, x) 681 SOLVE_EQUATION(y, z, x)
682 } 682 }
@@ -895,7 +895,7 @@ tangent_new_basis(Eina_Vector3 *out, Evas_Triangle3 *triangle,
895 895
896 896
897 /* calculation of new basis(in system coordinates of texturing) by solution of system of equations */ 897 /* calculation of new basis(in system coordinates of texturing) by solution of system of equations */
898 if (!EINA_DBL_CMP(new2.y, 0.0)) 898 if (!EINA_DBL_EQ(new2.y, 0.0))
899 { 899 {
900 eina_vector3_scale(&old2, &old2, (new1.y / new2.y)); 900 eina_vector3_scale(&old2, &old2, (new1.y / new2.y));
901 eina_vector2_scale(&new2, &new2, (new1.y / new2.y)); 901 eina_vector2_scale(&new2, &new2, (new1.y / new2.y));
@@ -906,7 +906,7 @@ tangent_new_basis(Eina_Vector3 *out, Evas_Triangle3 *triangle,
906 eina_vector3_scale(out, &old1, 1 / new1.x); 906 eina_vector3_scale(out, &old1, 1 / new1.x);
907 } 907 }
908 908
909 else if (!EINA_DBL_CMP(new1.y, 0.0)) 909 else if (!EINA_DBL_EQ(new1.y, 0.0))
910 { 910 {
911 eina_vector3_scale(&old1, &old1, (new2.y / new1.y)); 911 eina_vector3_scale(&old1, &old1, (new2.y / new1.y));
912 eina_vector2_scale(&new1, &new1, (new2.y / new1.y)); 912 eina_vector2_scale(&new1, &new1, (new2.y / new1.y));
@@ -977,8 +977,8 @@ convex_hull_first_tr_get(float *data, int count, int stride)
977 for (i = 1, j = stride; i < count; i++, j += stride) 977 for (i = 1, j = stride; i < count; i++, j += stride)
978 { 978 {
979 if ((triangle1.z > data[j + 2]) || 979 if ((triangle1.z > data[j + 2]) ||
980 ((EINA_FLT_CMP(triangle1.z, data[j + 2])) && (triangle1.y > data[j + 1])) || 980 ((EINA_FLT_EQ(triangle1.z, data[j + 2])) && (triangle1.y > data[j + 1])) ||
981 ((EINA_FLT_CMP(triangle1.z, data[j + 2])) && (EINA_FLT_CMP(triangle1.y, data[j + 1])) && (triangle1.x > data[j]))) 981 ((EINA_FLT_EQ(triangle1.z, data[j + 2])) && (EINA_FLT_EQ(triangle1.y, data[j + 1])) && (triangle1.x > data[j])))
982 { 982 {
983 eina_vector3_set(&triangle1, data[j], data[j + 1], data[j + 2]); 983 eina_vector3_set(&triangle1, data[j], data[j + 1], data[j + 2]);
984 first_num = i; 984 first_num = i;
@@ -1000,7 +1000,7 @@ convex_hull_first_tr_get(float *data, int count, int stride)
1000 cos_2d = new_cos_2d; \ 1000 cos_2d = new_cos_2d; \
1001 eina_vector3_set(&triangle, data[j], data[j + 1], data[j + 2]); \ 1001 eina_vector3_set(&triangle, data[j], data[j + 1], data[j + 2]); \
1002 } \ 1002 } \
1003 else if(!EINA_FLT_CMP(little, big) && \ 1003 else if(!EINA_FLT_EQ(little, big) && \
1004 (eina_vector3_distance_get(&triangle##_candidate, &previous) > \ 1004 (eina_vector3_distance_get(&triangle##_candidate, &previous) > \
1005 eina_vector3_distance_get(&triangle, &previous))) \ 1005 eina_vector3_distance_get(&triangle, &previous))) \
1006 { \ 1006 { \
@@ -1009,9 +1009,9 @@ convex_hull_first_tr_get(float *data, int count, int stride)
1009 eina_vector3_set(&complanar1, 1, 0, 0); 1009 eina_vector3_set(&complanar1, 1, 0, 0);
1010 for (i = 0, j = 0; i < count; i++, j += stride) 1010 for (i = 0, j = 0; i < count; i++, j += stride)
1011 { 1011 {
1012 if (EINA_FLT_CMP(data[j], triangle1.x) || 1012 if (EINA_FLT_EQ(data[j], triangle1.x) ||
1013 EINA_FLT_CMP(data[j + 1], triangle1.y) || 1013 EINA_FLT_EQ(data[j + 1], triangle1.y) ||
1014 EINA_FLT_CMP(data[j + 2], triangle1.z)) 1014 EINA_FLT_EQ(data[j + 2], triangle1.z))
1015 { 1015 {
1016 eina_vector3_set(&triangle2_candidate, data[j], data[j + 1], data[j + 2]); 1016 eina_vector3_set(&triangle2_candidate, data[j], data[j + 1], data[j + 2]);
1017 eina_vector3_subtract(&diagonal, &triangle2_candidate, &triangle1); 1017 eina_vector3_subtract(&diagonal, &triangle2_candidate, &triangle1);
@@ -1024,7 +1024,7 @@ convex_hull_first_tr_get(float *data, int count, int stride)
1024 eina_vector3_subtract(&diagonal, &triangle2, &triangle1); 1024 eina_vector3_subtract(&diagonal, &triangle2, &triangle1);
1025 cos_2d = eina_vector3_angle_get(&complanar1, &diagonal); 1025 cos_2d = eina_vector3_angle_get(&complanar1, &diagonal);
1026 } 1026 }
1027 else if (!EINA_FLT_CMP(sin, new_sin)) 1027 else if (!EINA_FLT_EQ(sin, new_sin))
1028 { 1028 {
1029 eina_vector3_subtract(&diagonal, &triangle2_candidate, &triangle1); 1029 eina_vector3_subtract(&diagonal, &triangle2_candidate, &triangle1);
1030 new_cos_2d = eina_vector3_angle_get(&complanar1, &diagonal); 1030 new_cos_2d = eina_vector3_angle_get(&complanar1, &diagonal);
@@ -1050,12 +1050,12 @@ convex_hull_first_tr_get(float *data, int count, int stride)
1050 { 1050 {
1051 eina_vector3_set(&candidate, data[j], data[j + 1], data[j + 2]); 1051 eina_vector3_set(&candidate, data[j], data[j + 1], data[j + 2]);
1052 1052
1053 if ((EINA_FLT_CMP(data[j], triangle1.x) || 1053 if ((EINA_FLT_EQ(data[j], triangle1.x) ||
1054 EINA_FLT_CMP(data[j + 1], triangle1.y) || 1054 EINA_FLT_EQ(data[j + 1], triangle1.y) ||
1055 EINA_FLT_CMP(data[j + 2], triangle1.z)) && 1055 EINA_FLT_EQ(data[j + 2], triangle1.z)) &&
1056 (EINA_FLT_CMP(data[j], triangle2.x) || 1056 (EINA_FLT_EQ(data[j], triangle2.x) ||
1057 EINA_FLT_CMP(data[j + 1], triangle2.y) || 1057 EINA_FLT_EQ(data[j + 1], triangle2.y) ||
1058 EINA_FLT_CMP(data[j + 2], triangle2.z))) 1058 EINA_FLT_EQ(data[j + 2], triangle2.z)))
1059 { 1059 {
1060 eina_vector3_plane_by_points(&normal_b, &triangle1, &candidate, &triangle2); 1060 eina_vector3_plane_by_points(&normal_b, &triangle1, &candidate, &triangle2);
1061 1061
@@ -1073,7 +1073,7 @@ convex_hull_first_tr_get(float *data, int count, int stride)
1073 eina_vector3_set(&triangle3, data[j], data[j + 1], data[j + 2]); 1073 eina_vector3_set(&triangle3, data[j], data[j + 1], data[j + 2]);
1074 cos_2d = eina_vector3_angle_get(&diagonal, &first); 1074 cos_2d = eina_vector3_angle_get(&diagonal, &first);
1075 } 1075 }
1076 else if (!EINA_FLT_CMP(new_cos, cos)) 1076 else if (!EINA_FLT_EQ(new_cos, cos))
1077 { 1077 {
1078 eina_vector3_set(&triangle3_candidate, data[j], data[j + 1], data[j + 2]); 1078 eina_vector3_set(&triangle3_candidate, data[j], data[j + 1], data[j + 2]);
1079 eina_vector3_subtract(&first, &triangle1, &triangle2); 1079 eina_vector3_subtract(&first, &triangle1, &triangle2);
@@ -1156,11 +1156,11 @@ evas_convex_hull_get(float *data, int count, int stride, Eina_Inarray *vertex,
1156 and one new vertex, all vertices should be checked */ 1156 and one new vertex, all vertices should be checked */
1157 for (i = 0, j = 0; i < count; i++, j += stride) 1157 for (i = 0, j = 0; i < count; i++, j += stride)
1158 { 1158 {
1159 if ((EINA_FLT_CMP(elem->p0.x, data[j]) || EINA_FLT_CMP(elem->p0.y, data[j + 1]) || 1159 if ((EINA_FLT_EQ(elem->p0.x, data[j]) || EINA_FLT_EQ(elem->p0.y, data[j + 1]) ||
1160 EINA_FLT_CMP(elem->p0.z, data[j + 2])) && (EINA_FLT_CMP(elem->p1.x, data[j]) || 1160 EINA_FLT_EQ(elem->p0.z, data[j + 2])) && (EINA_FLT_EQ(elem->p1.x, data[j]) ||
1161 EINA_FLT_CMP(elem->p1.y, data[j + 1]) || EINA_FLT_CMP(elem->p1.z, data[j + 2])) && 1161 EINA_FLT_EQ(elem->p1.y, data[j + 1]) || EINA_FLT_EQ(elem->p1.z, data[j + 2])) &&
1162 (EINA_FLT_CMP(elem->p2.x, data[j]) || EINA_FLT_CMP(elem->p2.y, data[j + 1]) || 1162 (EINA_FLT_EQ(elem->p2.x, data[j]) || EINA_FLT_EQ(elem->p2.y, data[j + 1]) ||
1163 EINA_FLT_CMP(elem->p2.z, data[j + 2]))) 1163 EINA_FLT_EQ(elem->p2.z, data[j + 2])))
1164 { 1164 {
1165 next = malloc(sizeof(Eina_Vector3)); 1165 next = malloc(sizeof(Eina_Vector3));
1166 eina_vector3_set(next, data[j], data[j + 1], data[j + 2]); 1166 eina_vector3_set(next, data[j], data[j + 1], data[j + 2]);
@@ -1234,7 +1234,7 @@ evas_convex_hull_get(float *data, int count, int stride, Eina_Inarray *vertex,
1234 /* The case when several points are found, is discussed below. 1234 /* The case when several points are found, is discussed below.
1235 This case is interesting because the convex hull in the 1235 This case is interesting because the convex hull in the
1236 two-dimensional subspace should be filled further */ 1236 two-dimensional subspace should be filled further */
1237 if ((!EINA_FLT_CMP(cos, 1.0)) && (1 < eina_array_count(&arr_candidates))) 1237 if ((!EINA_FLT_EQ(cos, 1.0)) && (1 < eina_array_count(&arr_candidates)))
1238 { 1238 {
1239 Eina_Vector3 angle_from, angle_to; 1239 Eina_Vector3 angle_from, angle_to;
1240 next_2d = eina_array_data_get(&arr_candidates, 0); 1240 next_2d = eina_array_data_get(&arr_candidates, 0);
@@ -1265,7 +1265,7 @@ evas_convex_hull_get(float *data, int count, int stride, Eina_Inarray *vertex,
1265 cos_2d = new_cos; 1265 cos_2d = new_cos;
1266 best = eina_array_data_get(&arr_candidates, k); 1266 best = eina_array_data_get(&arr_candidates, k);
1267 } 1267 }
1268 else if (!EINA_FLT_CMP(new_cos, cos_2d)) 1268 else if (!EINA_FLT_EQ(new_cos, cos_2d))
1269 { 1269 {
1270 if ((right && (eina_vector3_distance_get(best, &elem->p0) < eina_vector3_length_get(&angle_from))) || 1270 if ((right && (eina_vector3_distance_get(best, &elem->p0) < eina_vector3_length_get(&angle_from))) ||
1271 (!right && (eina_vector3_distance_get(best, &elem->p1) < eina_vector3_length_get(&angle_from)))) 1271 (!right && (eina_vector3_distance_get(best, &elem->p1) < eina_vector3_length_get(&angle_from))))
@@ -1277,7 +1277,7 @@ evas_convex_hull_get(float *data, int count, int stride, Eina_Inarray *vertex,
1277 /* This event will take place after the previous, 1277 /* This event will take place after the previous,
1278 in fact, choice of first triangle in a new two-dimensional 1278 in fact, choice of first triangle in a new two-dimensional
1279 convex hull allows to fill it fan counterclockwise when viewed from the inside */ 1279 convex hull allows to fill it fan counterclockwise when viewed from the inside */
1280 else if ((EINA_FLT_CMP(cos, 1.0)) && (1 < eina_array_count(&arr_candidates))) 1280 else if ((EINA_FLT_EQ(cos, 1.0)) && (1 < eina_array_count(&arr_candidates)))
1281 { 1281 {
1282 Eina_Vector3 angle_from, angle_to; 1282 Eina_Vector3 angle_from, angle_to;
1283 eina_vector3_subtract(&angle_from, &elem->p0, &elem->p1); 1283 eina_vector3_subtract(&angle_from, &elem->p0, &elem->p1);
@@ -1297,7 +1297,7 @@ evas_convex_hull_get(float *data, int count, int stride, Eina_Inarray *vertex,
1297 cos_2d = new_cos; 1297 cos_2d = new_cos;
1298 best = eina_array_data_get(&arr_candidates, k); 1298 best = eina_array_data_get(&arr_candidates, k);
1299 } 1299 }
1300 else if (!EINA_FLT_CMP(new_cos, cos_2d)) 1300 else if (!EINA_FLT_EQ(new_cos, cos_2d))
1301 { 1301 {
1302 if (eina_vector3_distance_get(best, &elem->p0) < eina_vector3_length_get(&angle_to)) 1302 if (eina_vector3_distance_get(best, &elem->p0) < eina_vector3_length_get(&angle_to))
1303 best = eina_array_data_get(&arr_candidates, k); 1303 best = eina_array_data_get(&arr_candidates, k);
@@ -1405,9 +1405,9 @@ evas_convex_hull_get(float *data, int count, int stride, Eina_Inarray *vertex,
1405 exist1 = EINA_FALSE; \ 1405 exist1 = EINA_FALSE; \
1406 for (i = 0, new_stride = 0; (i < vertex_count) && !exist1; i++, new_stride += 10) \ 1406 for (i = 0, new_stride = 0; (i < vertex_count) && !exist1; i++, new_stride += 10) \
1407 { \ 1407 { \
1408 if ((k > 0) && !EINA_FLT_CMP(el->p##coord.x, found_vertex[new_stride]) && \ 1408 if ((k > 0) && !EINA_FLT_EQ(el->p##coord.x, found_vertex[new_stride]) && \
1409 !EINA_FLT_CMP(el->p##coord.y, found_vertex[new_stride + 1]) && \ 1409 !EINA_FLT_EQ(el->p##coord.y, found_vertex[new_stride + 1]) && \
1410 !EINA_FLT_CMP(el->p##coord.z, found_vertex[new_stride + 2])) \ 1410 !EINA_FLT_EQ(el->p##coord.z, found_vertex[new_stride + 2])) \
1411 { \ 1411 { \
1412 exist1 = EINA_TRUE; \ 1412 exist1 = EINA_TRUE; \
1413 found_index[3 * k + coord] = i; \ 1413 found_index[3 * k + coord] = i; \
@@ -1536,10 +1536,10 @@ evas_tangent_space_get(float *data, float *tex_data, float *normal_data, unsigne
1536 if ((fabs(data[j] - data[m]) < FLT_EPSILON) && 1536 if ((fabs(data[j] - data[m]) < FLT_EPSILON) &&
1537 (fabs(data[j + 1] - data[m + 1]) < FLT_EPSILON) && 1537 (fabs(data[j + 1] - data[m + 1]) < FLT_EPSILON) &&
1538 (fabs(data[j + 2] - data[m + 2]) < FLT_EPSILON) && 1538 (fabs(data[j + 2] - data[m + 2]) < FLT_EPSILON) &&
1539 ((m == j) || ((!EINA_FLT_CMP(tex_data[i * tex_stride], 0.0)) && 1539 ((m == j) || ((!EINA_FLT_EQ(tex_data[i * tex_stride], 0.0)) &&
1540 !EINA_FLT_CMP(tex_data[i * tex_stride + 1], 0.0) && 1540 !EINA_FLT_EQ(tex_data[i * tex_stride + 1], 0.0) &&
1541 !EINA_FLT_CMP(tex_data[i * tex_stride], 1.0) && 1541 !EINA_FLT_EQ(tex_data[i * tex_stride], 1.0) &&
1542 !EINA_FLT_CMP(tex_data[i * tex_stride + 1], 1.0)))) 1542 !EINA_FLT_EQ(tex_data[i * tex_stride + 1], 1.0))))
1543 { 1543 {
1544 found_index = l; 1544 found_index = l;
1545 for (k = 0; k < index_count; k += 3) 1545 for (k = 0; k < index_count; k += 3)