eina: rename EINA_{FLT,DBL}_CMP to EINA_{FLT,DBL}_EQ.

This commit is contained in:
Cedric BAIL 2017-01-06 09:57:46 -08:00
parent f9928b75c8
commit 8f1c071d6a
78 changed files with 549 additions and 547 deletions

View File

@ -114,7 +114,7 @@ _param_value_str_get(const Edje_External_Type *type, const Edje_External_Param_I
return buf; return buf;
case EDJE_EXTERNAL_PARAM_TYPE_DOUBLE: case EDJE_EXTERNAL_PARAM_TYPE_DOUBLE:
if (EINA_DBL_CMP(param->info.d.def, EDJE_EXTERNAL_DOUBLE_UNSET)) return NULL; if (EINA_DBL_EQ(param->info.d.def, EDJE_EXTERNAL_DOUBLE_UNSET)) return NULL;
snprintf(buf, buflen, "%g", param->info.d.def); snprintf(buf, buflen, "%g", param->info.d.def);
return buf; return buf;
@ -219,17 +219,17 @@ _param_extra_details(const Edje_External_Type *type, const Edje_External_Param_I
break; break;
case EDJE_EXTERNAL_PARAM_TYPE_DOUBLE: case EDJE_EXTERNAL_PARAM_TYPE_DOUBLE:
if (EINA_DBL_CMP(param->info.d.min, EDJE_EXTERNAL_DOUBLE_UNSET)) if (EINA_DBL_EQ(param->info.d.min, EDJE_EXTERNAL_DOUBLE_UNSET))
{ {
if (machine) printf("MIN: %g\n", param->info.d.min); if (machine) printf("MIN: %g\n", param->info.d.min);
else printf(", min: %g", param->info.d.min); else printf(", min: %g", param->info.d.min);
} }
if (EINA_DBL_CMP(param->info.d.max, EDJE_EXTERNAL_DOUBLE_UNSET)) if (EINA_DBL_EQ(param->info.d.max, EDJE_EXTERNAL_DOUBLE_UNSET))
{ {
if (machine) printf("MAX: %g\n", param->info.d.max); if (machine) printf("MAX: %g\n", param->info.d.max);
else printf(", max: %g", param->info.d.max); else printf(", max: %g", param->info.d.max);
} }
if (EINA_DBL_CMP(param->info.d.step, EDJE_EXTERNAL_DOUBLE_UNSET)) if (EINA_DBL_EQ(param->info.d.step, EDJE_EXTERNAL_DOUBLE_UNSET))
{ {
if (machine) printf("STEP: %g\n", param->info.d.step); if (machine) printf("STEP: %g\n", param->info.d.step);
else printf(", step: %g", param->info.d.step); else printf(", step: %g", param->info.d.step);

View File

@ -1233,8 +1233,8 @@ _attr_parse_rect_node(void *data, const char *key, const char *value)
_parse_style_attr(node, key, value); _parse_style_attr(node, key, value);
} }
if (!EINA_DBL_CMP(rect->rx, 0) && EINA_DBL_CMP(rect->ry, 0)) rect->ry = rect->rx; if (!EINA_DBL_EQ(rect->rx, 0) && EINA_DBL_EQ(rect->ry, 0)) rect->ry = rect->rx;
if (!EINA_DBL_CMP(rect->ry, 0) && EINA_DBL_CMP(rect->rx, 0)) rect->rx = rect->ry; if (!EINA_DBL_EQ(rect->ry, 0) && EINA_DBL_EQ(rect->rx, 0)) rect->rx = rect->ry;
return EINA_TRUE; return EINA_TRUE;
} }

View File

@ -47,13 +47,13 @@ _cb_color_changed(void *data, Evas_Object *obj, void *event EINA_UNUSED)
double val = 0.0; double val = 0.0;
val = elm_spinner_value_get(obj); val = elm_spinner_value_get(obj);
if (EINA_DBL_CMP(val, 1.0)) if (EINA_DBL_EQ(val, 1.0))
elm_bg_color_set(o_bg, 255, 255, 255); elm_bg_color_set(o_bg, 255, 255, 255);
else if (EINA_DBL_CMP(val, 2.0)) else if (EINA_DBL_EQ(val, 2.0))
elm_bg_color_set(o_bg, 255, 0, 0); elm_bg_color_set(o_bg, 255, 0, 0);
else if (EINA_DBL_CMP(val, 3.0)) else if (EINA_DBL_EQ(val, 3.0))
elm_bg_color_set(o_bg, 0, 0, 255); elm_bg_color_set(o_bg, 0, 0, 255);
else if (EINA_DBL_CMP(val, 4.0)) else if (EINA_DBL_EQ(val, 4.0))
elm_bg_color_set(o_bg, 0, 255, 0); elm_bg_color_set(o_bg, 0, 255, 0);
} }

View File

@ -385,7 +385,7 @@ _state_update(State *st)
if (mx < 1) mx = 1; // quick hack to keep curl line visible if (mx < 1) mx = 1; // quick hack to keep curl line visible
if (EINA_DBL_CMP(mgrad, 0.0)) // special horizontal case if (EINA_DBL_EQ(mgrad, 0.0)) // special horizontal case
mgrad = 0.001; // quick dirty hack for now mgrad = 0.001; // quick dirty hack for now
// else // else
{ {

View File

@ -431,7 +431,7 @@ _files_all_print_all(void)
_shared_string_get(fd->path), _shared_string_get(fd->key)); _shared_string_get(fd->path), _shared_string_get(fd->key));
printf("LoadOpts: Region: %d,%d-%dx%d\n", printf("LoadOpts: Region: %d,%d-%dx%d\n",
fd->lo.region.x, fd->lo.region.y, fd->lo.region.w, fd->lo.region.h); fd->lo.region.x, fd->lo.region.y, fd->lo.region.w, fd->lo.region.h);
if (!EINA_DBL_CMP(fd->lo.dpi, 0)) if (!EINA_DBL_EQ(fd->lo.dpi, 0))
printf(" DPI: %f\n"); printf(" DPI: %f\n");
else else
printf(" DPI: 0\n"); printf(" DPI: 0\n");
@ -519,7 +519,7 @@ _images_all_print_full(void)
printf(" height %d\n", id->opts.emile.h); printf(" height %d\n", id->opts.emile.h);
printf(" degree %d\n", id->opts.emile.degree); printf(" degree %d\n", id->opts.emile.degree);
printf(" scale_down_by %d\n", id->opts.emile.scale_down_by); printf(" scale_down_by %d\n", id->opts.emile.scale_down_by);
if (!EINA_DBL_CMP(id->opts.emile.dpi, 0.0)) if (!EINA_DBL_EQ(id->opts.emile.dpi, 0.0))
printf(" dpi %.2f\n", id->opts.emile.dpi); printf(" dpi %.2f\n", id->opts.emile.dpi);
else else
printf(" dpi 0\n"); printf(" dpi 0\n");

View File

@ -22,7 +22,7 @@
#include <float.h> #include <float.h>
#define EINA_FLT_CMP(a, b) (fabsf((float)a - (float)b) <= FLT_EPSILON) #define EINA_FLT_EQ(a, b) (fabsf((float)a - (float)b) <= FLT_EPSILON)
#define RS R_VAL(src + s_idx) #define RS R_VAL(src + s_idx)
#define GS G_VAL(src + s_idx) #define GS G_VAL(src + s_idx)
@ -132,7 +132,7 @@ hls_to_rgb (DATA8 *hue, DATA8 *lightness, DATA8 *saturation)
l = *lightness; l = *lightness;
s = *saturation; s = *saturation;
if (EINA_FLT_CMP(s, 0)) if (EINA_FLT_EQ(s, 0))
{ {
/* achromatic case */ /* achromatic case */
*hue = l; *hue = l;
@ -188,7 +188,7 @@ rgb_to_hsv (DATA8 *red, DATA8 *green, DATA8 *blue)
else else
s = 0; s = 0;
if (EINA_FLT_CMP(s, 0)) if (EINA_FLT_EQ(s, 0))
h = 0; h = 0;
else else
{ {

View File

@ -196,7 +196,7 @@ _timer_tick_core(void *data EINA_UNUSED, Ecore_Thread *thread)
d = fmod(t0, ft); d = fmod(t0, ft);
if (tick) if (tick)
{ {
if (!EINA_FLT_CMP(pframetime, ft)) if (!EINA_FLT_EQ(pframetime, ft))
{ {
t = (ft - d) * 1000000000.0; t = (ft - d) * 1000000000.0;
t_ft = ft * 1000000000.0; t_ft = ft * 1000000000.0;
@ -661,7 +661,7 @@ _cubic_bezier_t_get(double a,
for (int i = 0; i < LIMIT; i++) for (int i = 0; i < LIMIT; i++)
{ {
current_slope = _cubic_bezier_slope_get(guess_t, x1, x2); current_slope = _cubic_bezier_slope_get(guess_t, x1, x2);
if (EINA_FLT_CMP(current_slope, 0.0)) return guess_t; if (EINA_FLT_EQ(current_slope, 0.0)) return guess_t;
current_x = _cubic_bezier_calc(guess_t, x1, x2) - a; current_x = _cubic_bezier_calc(guess_t, x1, x2) - a;
change = current_x / current_slope; change = current_x / current_slope;
guess_t -= change; guess_t -= change;
@ -677,8 +677,8 @@ _pos_map_cubic_bezier(double pos,
double x2, double x2,
double y2) double y2)
{ {
if (EINA_FLT_CMP(x1, y1) && if (EINA_FLT_EQ(x1, y1) &&
EINA_FLT_CMP(x2, y2)) EINA_FLT_EQ(x2, y2))
return pos; return pos;
return _cubic_bezier_calc(_cubic_bezier_t_get(pos, x1, x2), y1, y2); return _cubic_bezier_calc(_cubic_bezier_t_get(pos, x1, x2), y1, y2);
} }
@ -819,7 +819,7 @@ ecore_animator_frametime_set(double frametime)
{ {
EINA_MAIN_LOOP_CHECK_RETURN; EINA_MAIN_LOOP_CHECK_RETURN;
if (frametime < 0.0) frametime = 0.0; if (frametime < 0.0) frametime = 0.0;
if (EINA_FLT_CMP(animators_frametime, frametime)) return ; if (EINA_FLT_EQ(animators_frametime, frametime)) return ;
animators_frametime = frametime; animators_frametime = frametime;
_end_tick(); _end_tick();
if (_have_animators()) _begin_tick(); if (_have_animators()) _begin_tick();

View File

@ -1694,7 +1694,7 @@ _ecore_main_select(double timeout)
int max_fd, ret, err_no; int max_fd, ret, err_no;
t = NULL; t = NULL;
if ((!ECORE_FINITE(timeout)) || (EINA_FLT_CMP(timeout, 0.0))) /* finite() tests for NaN, too big, too small, and infinity. */ if ((!ECORE_FINITE(timeout)) || (EINA_FLT_EQ(timeout, 0.0))) /* finite() tests for NaN, too big, too small, and infinity. */
{ {
tv.tv_sec = 0; tv.tv_sec = 0;
tv.tv_usec = 0; tv.tv_usec = 0;

View File

@ -427,7 +427,7 @@ _ecore_pipe_wait(Ecore_Pipe *p,
if (wait >= 0.0) if (wait >= 0.0)
{ {
/* finite() tests for NaN, too big, too small, and infinity. */ /* finite() tests for NaN, too big, too small, and infinity. */
if ((!ECORE_FINITE(timeout)) || (EINA_FLT_CMP(timeout, 0.0))) if ((!ECORE_FINITE(timeout)) || (EINA_FLT_EQ(timeout, 0.0)))
{ {
tv.tv_sec = 0; tv.tv_sec = 0;
tv.tv_usec = 0; tv.tv_usec = 0;

View File

@ -99,7 +99,7 @@ _ecore_poller_next_tick_eval(void)
else else
{ {
t = ecore_time_get(); t = ecore_time_get();
if (!EINA_FLT_CMP(interval, poll_cur_interval)) if (!EINA_FLT_EQ(interval, poll_cur_interval))
{ {
t -= last_tick; /* time since we last ticked */ t -= last_tick; /* time since we last ticked */
/* delete the timer and reset it to tick off in the new /* delete the timer and reset it to tick off in the new

View File

@ -1462,7 +1462,7 @@ ecore_thread_global_data_wait(const char *key,
ret = eina_hash_find(_ecore_thread_global_hash, key); ret = eina_hash_find(_ecore_thread_global_hash, key);
LRWKU(_ecore_thread_global_hash_lock); LRWKU(_ecore_thread_global_hash_lock);
if ((ret) || if ((ret) ||
(!EINA_FLT_CMP(seconds, 0.0)) || (!EINA_FLT_EQ(seconds, 0.0)) ||
((seconds > 0) && (tm <= ecore_time_get()))) ((seconds > 0) && (tm <= ecore_time_get())))
break; break;
LKL(_ecore_thread_global_hash_mutex); LKL(_ecore_thread_global_hash_mutex);

View File

@ -2807,7 +2807,7 @@ _ecore_evas_fps_debug_rendertime_add(double t)
tim = ecore_time_get(); tim = ecore_time_get();
rtime += t; rtime += t;
frames++; frames++;
if (EINA_DBL_CMP(rlapse, 0.0)) if (EINA_DBL_EQ(rlapse, 0.0))
{ {
rlapse = tim; rlapse = tim;
flapse = frames; flapse = frames;
@ -4291,8 +4291,8 @@ _pointer_position_set(Efl_Input_Pointer_Data *ev, Ecore_Evas *ee, int x, int y,
{ {
int fx, fy, fw, fh; int fx, fy, fw, fh;
if ((EINA_DBL_CMP(mx, 0.0)) && if ((EINA_DBL_EQ(mx, 0.0)) &&
(EINA_DBL_CMP(my, 0.0))) (EINA_DBL_EQ(my, 0.0)))
{ {
mx = x; mx = x;
my = y; my = y;

View File

@ -699,8 +699,8 @@ EAPI void
ecore_fb_input_device_threshold_click_set(Ecore_Fb_Input_Device *dev, double threshold) ecore_fb_input_device_threshold_click_set(Ecore_Fb_Input_Device *dev, double threshold)
{ {
if (!dev) return; if (!dev) return;
if ((EINA_DBL_CMP(threshold, dev->mouse.threshold)) || if ((EINA_DBL_EQ(threshold, dev->mouse.threshold)) ||
(EINA_DBL_CMP(threshold, 0.0))) return; (EINA_DBL_EQ(threshold, 0.0))) return;
dev->mouse.threshold = threshold; dev->mouse.threshold = threshold;
} }

View File

@ -221,7 +221,7 @@ _ecore_event_evas_push_mouse_button(Ecore_Event_Mouse_Button *e, Ecore_Event_Pre
//if up event not occurs from under layers of ecore //if up event not occurs from under layers of ecore
//up event is generated by ecore //up event is generated by ecore
if (_last_events_enable && if (_last_events_enable &&
!EINA_DBL_CMP(_last_events_timeout, 0)) !EINA_DBL_EQ(_last_events_timeout, 0))
{ {
if (eel->timer) ecore_timer_del(eel->timer); if (eel->timer) ecore_timer_del(eel->timer);
eel->timer = NULL; eel->timer = NULL;

View File

@ -34,7 +34,7 @@ _ector_renderer_software_gradient_linear_ector_renderer_prepare(Eo *obj,
pd->linear.l = pd->linear.dx * pd->linear.dx + pd->linear.dy * pd->linear.dy; pd->linear.l = pd->linear.dx * pd->linear.dx + pd->linear.dy * pd->linear.dy;
pd->linear.off = 0; pd->linear.off = 0;
if (!EINA_DBL_CMP(pd->linear.l, 0.0)) if (!EINA_DBL_EQ(pd->linear.l, 0.0))
{ {
pd->linear.dx /= pd->linear.l; pd->linear.dx /= pd->linear.l;
pd->linear.dy /= pd->linear.l; pd->linear.dy /= pd->linear.l;

View File

@ -26,12 +26,12 @@ _ector_renderer_software_gradient_radial_ector_renderer_prepare(Eo *obj, Ector_R
pd->radial.cy = pd->grd->radial.y; pd->radial.cy = pd->grd->radial.y;
pd->radial.cradius = pd->grd->radius; pd->radial.cradius = pd->grd->radius;
if (EINA_DBL_CMP(pd->grd->focal.x, 0.0)) if (EINA_DBL_EQ(pd->grd->focal.x, 0.0))
pd->radial.fx = pd->grd->radial.x; pd->radial.fx = pd->grd->radial.x;
else else
pd->radial.fx = pd->grd->focal.x; pd->radial.fx = pd->grd->focal.x;
if (EINA_DBL_CMP(pd->grd->focal.y, 0.0)) if (EINA_DBL_EQ(pd->grd->focal.y, 0.0))
pd->radial.fy = pd->grd->radial.y; pd->radial.fy = pd->grd->radial.y;
else else
pd->radial.fy = pd->grd->focal.y; pd->radial.fy = pd->grd->focal.y;

View File

@ -386,7 +386,7 @@ fetch_linear_gradient(uint32_t *buffer, Span_Data *data, int y, int x, int lengt
uint32_t *end; uint32_t *end;
int t_fixed, inc_fixed; int t_fixed, inc_fixed;
if (EINA_DBL_CMP(g_data->linear.l, 0.0)) if (EINA_DBL_EQ(g_data->linear.l, 0.0))
{ {
t = inc = 0; t = inc = 0;
} }

View File

@ -2945,8 +2945,8 @@ _edje_dupe_vector_data(Edje *ed, int svg_id, double width, double height,
root = evas_vg_container_add(NULL); root = evas_vg_container_add(NULL);
efl_vg_dup(root, vector->vg); efl_vg_dup(root, vector->vg);
if (!EINA_DBL_CMP(vector->w, 0) && if (!EINA_DBL_EQ(vector->w, 0) &&
!EINA_DBL_CMP(vector->h, 0)) !EINA_DBL_EQ(vector->h, 0))
{ {
_apply_transformation(root, width, height, vector); _apply_transformation(root, width, height, vector);
} }

View File

@ -176,8 +176,8 @@ EAPI extern int _edje_default_log_dom ;
#define COS(a) cos(a) #define COS(a) cos(a)
#define SIN(a) sin(a) #define SIN(a) sin(a)
#define PI 3.14159265358979323846 #define PI 3.14159265358979323846
#define EQ(a, b) EINA_DBL_CMP(a, b) #define EQ(a, b) EINA_DBL_EQ(a, b)
#define NEQ(a, b) !EINA_DBL_CMP(a, b) #define NEQ(a, b) !EINA_DBL_EQ(a, b)
#endif #endif

View File

@ -2279,11 +2279,11 @@ _edje_param_validate(const Edje_External_Param *param, const Edje_External_Param
return EINA_TRUE; return EINA_TRUE;
case EDJE_EXTERNAL_PARAM_TYPE_DOUBLE: case EDJE_EXTERNAL_PARAM_TYPE_DOUBLE:
if (!EINA_DBL_CMP(info->info.d.min, EDJE_EXTERNAL_DOUBLE_UNSET) && if (!EINA_DBL_EQ(info->info.d.min, EDJE_EXTERNAL_DOUBLE_UNSET) &&
(info->info.d.min > param->d)) (info->info.d.min > param->d))
return EINA_FALSE; return EINA_FALSE;
if (!EINA_DBL_CMP(info->info.d.max, EDJE_EXTERNAL_DOUBLE_UNSET) && if (!EINA_DBL_EQ(info->info.d.max, EDJE_EXTERNAL_DOUBLE_UNSET) &&
(info->info.d.max < param->d)) (info->info.d.max < param->d))
return EINA_FALSE; return EINA_FALSE;

View File

@ -220,7 +220,7 @@ _edje_textblock_style_update(Edje *ed, Edje_Style *stl, Eina_Bool force)
eina_strbuf_append(txt, "font_source="); eina_strbuf_append(txt, "font_source=");
eina_strbuf_append(txt, fontsource); eina_strbuf_append(txt, fontsource);
} }
if (!EINA_DBL_CMP(tag->font_size, 0)) if (!EINA_DBL_EQ(tag->font_size, 0))
{ {
char font_size[32]; char font_size[32];

View File

@ -359,7 +359,7 @@ edje_password_show_last_set(Eina_Bool password_show_last)
EAPI void EAPI void
edje_password_show_last_timeout_set(double password_show_last_timeout) edje_password_show_last_timeout_set(double password_show_last_timeout)
{ {
if (EINA_DBL_CMP(_edje_password_show_last_timeout, password_show_last_timeout)) return; if (EINA_DBL_EQ(_edje_password_show_last_timeout, password_show_last_timeout)) return;
_edje_password_show_last_timeout = password_show_last_timeout; _edje_password_show_last_timeout = password_show_last_timeout;
} }

View File

@ -756,7 +756,7 @@ _efl_gfx_t_for_arc_angle(double angle)
double radians, cos_angle, sin_angle, tc, ts, t; double radians, cos_angle, sin_angle, tc, ts, t;
if (angle < 0.00001) return 0; if (angle < 0.00001) return 0;
if (EINA_FLT_CMP(angle, 90.0)) return 1; if (EINA_FLT_EQ(angle, 90.0)) return 1;
radians = (angle/180) * M_PI; radians = (angle/180) * M_PI;
@ -799,7 +799,7 @@ _find_ellipse_coords(double x, double y, double w, double h, double angle,
double angles[2] = { angle, angle + length }; double angles[2] = { angle, angle + length };
Point *points[2]; Point *points[2];
if (!EINA_FLT_CMP(w, 0.0) || !EINA_FLT_CMP(h, 0.0)) if (!EINA_FLT_EQ(w, 0.0) || !EINA_FLT_EQ(h, 0.0))
{ {
if (start_point) if (start_point)
{ {
@ -900,15 +900,15 @@ _curves_for_arc(double x, double y, double w, double h,
else if (sweep_length < -360) sweep_length = -360; else if (sweep_length < -360) sweep_length = -360;
// Special case fast paths // Special case fast paths
if (EINA_FLT_CMP(start_angle, 0)) if (EINA_FLT_EQ(start_angle, 0))
{ {
if (EINA_FLT_CMP(sweep_length, 360)) if (EINA_FLT_EQ(sweep_length, 360))
{ {
for (i = 11; i >= 0; --i) for (i = 11; i >= 0; --i)
curves[(*point_count)++] = points[i]; curves[(*point_count)++] = points[i];
return points[12]; return points[12];
} }
else if (EINA_FLT_CMP(sweep_length, -360)) else if (EINA_FLT_EQ(sweep_length, -360))
{ {
for (i = 1; i <= 12; ++i) for (i = 1; i <= 12; ++i)
curves[(*point_count)++] = points[i]; curves[(*point_count)++] = points[i];
@ -930,14 +930,14 @@ _curves_for_arc(double x, double y, double w, double h,
} }
// avoid empty start segment // avoid empty start segment
if (EINA_FLT_CMP(start_t, 1.0)) if (EINA_FLT_EQ(start_t, 1.0))
{ {
start_t = 0; start_t = 0;
start_segment += delta; start_segment += delta;
} }
// avoid empty end segment // avoid empty end segment
if (EINA_FLT_CMP(end_t, 0.0)) if (EINA_FLT_EQ(end_t, 0.0))
{ {
end_t = 1; end_t = 1;
end_segment -= delta; end_segment -= delta;
@ -979,7 +979,7 @@ _curves_for_arc(double x, double y, double w, double h,
points[j + 3].x, points[j + 3].y); points[j + 3].x, points[j + 3].y);
// empty arc? // empty arc?
if (start_segment == end_segment && (EINA_FLT_CMP(start_t, end_t))) if (start_segment == end_segment && (EINA_FLT_EQ(start_t, end_t)))
return start_point; return start_point;
res = b; res = b;

View File

@ -543,7 +543,7 @@ efreet_icon_lookup_icon(Efreet_Cache_Icon *icon, unsigned int size)
distance = efreet_icon_size_distance(icon->icons[i], size); distance = efreet_icon_size_distance(icon->icons[i], size);
if (distance > minimal_distance) continue; if (distance > minimal_distance) continue;
// prefer downsizing // prefer downsizing
if ((EINA_DBL_CMP(distance, minimal_distance)) && if ((EINA_DBL_EQ(distance, minimal_distance)) &&
(icon->icons[i]->normal < ret_size)) (icon->icons[i]->normal < ret_size))
continue; continue;

View File

@ -226,7 +226,7 @@ eina_bezier_t_at(const Eina_Bezier *b, double l)
double biggest = 1.0; double biggest = 1.0;
double t = 1.0; double t = 1.0;
if (l >= len)// || (EINA_DBL_CMP(len, l))) if (l >= len)// || (EINA_DBL_EQ(len, l)))
return t; return t;
t *= 0.5; t *= 0.5;
@ -240,7 +240,7 @@ eina_bezier_t_at(const Eina_Bezier *b, double l)
_eina_bezier_split_left(&right, t, &left); _eina_bezier_split_left(&right, t, &left);
ll = eina_bezier_length_get(&left); ll = eina_bezier_length_get(&left);
if (EINA_DBL_CMP(ll, l)) if (EINA_DBL_EQ(ll, l))
break; break;
if (ll < l) if (ll < l)
@ -317,8 +317,8 @@ eina_bezier_on_interval(Eina_Bezier *b, double t0, double t1, Eina_Bezier *resul
Eina_Bezier bezier; Eina_Bezier bezier;
double t; double t;
if (EINA_DBL_CMP(t0, 0.0) && if (EINA_DBL_EQ(t0, 0.0) &&
EINA_DBL_CMP(t1, 1.0)) EINA_DBL_EQ(t1, 1.0))
{ {
*result = *b; *result = *b;
return; return;

View File

@ -106,18 +106,18 @@ _cos(double x)
EAPI Eina_Matrix_Type EAPI Eina_Matrix_Type
eina_matrix3_type_get(const Eina_Matrix3 *m) eina_matrix3_type_get(const Eina_Matrix3 *m)
{ {
if (!EINA_DBL_CMP(MATRIX_ZX(m), 0.0) || if (!EINA_DBL_EQ(MATRIX_ZX(m), 0.0) ||
!EINA_DBL_CMP(MATRIX_ZY(m), 0.0) || !EINA_DBL_EQ(MATRIX_ZY(m), 0.0) ||
!EINA_DBL_CMP(MATRIX_ZZ(m), 1.0)) !EINA_DBL_EQ(MATRIX_ZZ(m), 1.0))
return EINA_MATRIX_TYPE_PROJECTIVE; return EINA_MATRIX_TYPE_PROJECTIVE;
else else
{ {
if (EINA_DBL_CMP(MATRIX_XX(m), 1.0) && if (EINA_DBL_EQ(MATRIX_XX(m), 1.0) &&
EINA_DBL_CMP(MATRIX_XY(m), 0.0) && EINA_DBL_EQ(MATRIX_XY(m), 0.0) &&
EINA_DBL_CMP(MATRIX_XZ(m), 0.0) && EINA_DBL_EQ(MATRIX_XZ(m), 0.0) &&
EINA_DBL_CMP(MATRIX_YX(m), 0.0) && EINA_DBL_EQ(MATRIX_YX(m), 0.0) &&
EINA_DBL_CMP(MATRIX_YY(m), 1.0) && EINA_DBL_EQ(MATRIX_YY(m), 1.0) &&
EINA_DBL_CMP(MATRIX_YZ(m), 0.0)) EINA_DBL_EQ(MATRIX_YZ(m), 0.0))
return EINA_MATRIX_TYPE_IDENTITY; return EINA_MATRIX_TYPE_IDENTITY;
else else
return EINA_MATRIX_TYPE_AFFINE; return EINA_MATRIX_TYPE_AFFINE;
@ -127,22 +127,22 @@ eina_matrix3_type_get(const Eina_Matrix3 *m)
EAPI Eina_Matrix_Type EAPI Eina_Matrix_Type
eina_matrix4_type_get(const Eina_Matrix4 *m) eina_matrix4_type_get(const Eina_Matrix4 *m)
{ {
if (EINA_DBL_CMP(MATRIX_XX(m), 1.0) && if (EINA_DBL_EQ(MATRIX_XX(m), 1.0) &&
EINA_DBL_CMP(MATRIX_XY(m), 0.0) && EINA_DBL_EQ(MATRIX_XY(m), 0.0) &&
EINA_DBL_CMP(MATRIX_XZ(m), 0.0) && EINA_DBL_EQ(MATRIX_XZ(m), 0.0) &&
EINA_DBL_CMP(MATRIX_XW(m), 0.0) && EINA_DBL_EQ(MATRIX_XW(m), 0.0) &&
EINA_DBL_CMP(MATRIX_YX(m), 0.0) && EINA_DBL_EQ(MATRIX_YX(m), 0.0) &&
EINA_DBL_CMP(MATRIX_YY(m), 1.0) && EINA_DBL_EQ(MATRIX_YY(m), 1.0) &&
EINA_DBL_CMP(MATRIX_YZ(m), 0.0) && EINA_DBL_EQ(MATRIX_YZ(m), 0.0) &&
EINA_DBL_CMP(MATRIX_YW(m), 0.0) && EINA_DBL_EQ(MATRIX_YW(m), 0.0) &&
EINA_DBL_CMP(MATRIX_ZX(m), 0.0) && EINA_DBL_EQ(MATRIX_ZX(m), 0.0) &&
EINA_DBL_CMP(MATRIX_ZY(m), 0.0) && EINA_DBL_EQ(MATRIX_ZY(m), 0.0) &&
EINA_DBL_CMP(MATRIX_ZZ(m), 1.0) && EINA_DBL_EQ(MATRIX_ZZ(m), 1.0) &&
EINA_DBL_CMP(MATRIX_ZW(m), 0.0) && EINA_DBL_EQ(MATRIX_ZW(m), 0.0) &&
EINA_DBL_CMP(MATRIX_WX(m), 0.0) && EINA_DBL_EQ(MATRIX_WX(m), 0.0) &&
EINA_DBL_CMP(MATRIX_WY(m), 0.0) && EINA_DBL_EQ(MATRIX_WY(m), 0.0) &&
EINA_DBL_CMP(MATRIX_WZ(m), 0.0) && EINA_DBL_EQ(MATRIX_WZ(m), 0.0) &&
EINA_DBL_CMP(MATRIX_WW(m), 1.0)) EINA_DBL_EQ(MATRIX_WW(m), 1.0))
return EINA_MATRIX_TYPE_IDENTITY; return EINA_MATRIX_TYPE_IDENTITY;
return EINA_MATRIX_TYPE_AFFINE; return EINA_MATRIX_TYPE_AFFINE;
} }
@ -280,8 +280,8 @@ eina_matrix3_point_transform(const Eina_Matrix3 *m,
{ {
double xrr, yrr; double xrr, yrr;
if (!EINA_DBL_CMP(MATRIX_ZX(m), 0.0) && if (!EINA_DBL_EQ(MATRIX_ZX(m), 0.0) &&
!EINA_DBL_CMP(MATRIX_ZY(m), 0.0)) !EINA_DBL_EQ(MATRIX_ZY(m), 0.0))
{ {
xrr = (x * MATRIX_XX(m) + y * MATRIX_XY(m) + MATRIX_XZ(m)); xrr = (x * MATRIX_XX(m) + y * MATRIX_XY(m) + MATRIX_XZ(m));
yrr = (x * MATRIX_YX(m) + y * MATRIX_YY(m) + MATRIX_YZ(m)); yrr = (x * MATRIX_YX(m) + y * MATRIX_YY(m) + MATRIX_YZ(m));
@ -401,7 +401,7 @@ eina_matrix3_inverse(const Eina_Matrix3 *m, Eina_Matrix3 *m2)
/* determinant */ /* determinant */
scalar = eina_matrix3_determinant(m); scalar = eina_matrix3_determinant(m);
if (EINA_DBL_CMP(scalar, 0.0)) if (EINA_DBL_EQ(scalar, 0.0))
{ {
eina_matrix3_identity(m2); eina_matrix3_identity(m2);
return; return;
@ -445,15 +445,15 @@ eina_matrix3_compose(const Eina_Matrix3 *m1,
EAPI Eina_Bool EAPI Eina_Bool
eina_matrix3_equal(const Eina_Matrix3 *m1, const Eina_Matrix3 *m2) eina_matrix3_equal(const Eina_Matrix3 *m1, const Eina_Matrix3 *m2)
{ {
if (!EINA_DBL_CMP(m1->xx, m2->xx) || if (!EINA_DBL_EQ(m1->xx, m2->xx) ||
!EINA_DBL_CMP(m1->xy, m2->xy) || !EINA_DBL_EQ(m1->xy, m2->xy) ||
!EINA_DBL_CMP(m1->xz, m2->xz) || !EINA_DBL_EQ(m1->xz, m2->xz) ||
!EINA_DBL_CMP(m1->yx, m2->yx) || !EINA_DBL_EQ(m1->yx, m2->yx) ||
!EINA_DBL_CMP(m1->yy, m2->yy) || !EINA_DBL_EQ(m1->yy, m2->yy) ||
!EINA_DBL_CMP(m1->yz, m2->yz) || !EINA_DBL_EQ(m1->yz, m2->yz) ||
!EINA_DBL_CMP(m1->zx, m2->zx) || !EINA_DBL_EQ(m1->zx, m2->zx) ||
!EINA_DBL_CMP(m1->zy, m2->zy) || !EINA_DBL_EQ(m1->zy, m2->zy) ||
!EINA_DBL_CMP(m1->zz, m2->zz)) !EINA_DBL_EQ(m1->zz, m2->zz))
return EINA_FALSE; return EINA_FALSE;
return EINA_TRUE; return EINA_TRUE;
} }
@ -602,7 +602,7 @@ eina_matrix3_square_quad_map(Eina_Matrix3 *m, const Eina_Quad *q)
double ey = QUAD_Y0(q) - QUAD_Y1(q) + QUAD_Y2(q) - QUAD_Y3(q); double ey = QUAD_Y0(q) - QUAD_Y1(q) + QUAD_Y2(q) - QUAD_Y3(q);
/* paralellogram */ /* paralellogram */
if (EINA_DBL_CMP(ex, 0.0) && EINA_DBL_CMP(ey, 0.0)) if (EINA_DBL_EQ(ex, 0.0) && EINA_DBL_EQ(ey, 0.0))
{ {
/* create the affine matrix */ /* create the affine matrix */
MATRIX_XX(m) = QUAD_X1(q) - QUAD_X0(q); MATRIX_XX(m) = QUAD_X1(q) - QUAD_X0(q);
@ -627,7 +627,7 @@ eina_matrix3_square_quad_map(Eina_Matrix3 *m, const Eina_Quad *q)
double dy2 = QUAD_Y3(q) - QUAD_Y2(q); // y3 - y2 double dy2 = QUAD_Y3(q) - QUAD_Y2(q); // y3 - y2
double den = (dx1 * dy2) - (dx2 * dy1); double den = (dx1 * dy2) - (dx2 * dy1);
if (EINA_DBL_CMP(den, 0.0)) if (EINA_DBL_EQ(den, 0.0))
return EINA_FALSE; return EINA_FALSE;
MATRIX_ZX(m) = ((ex * dy2) - (dx2 * ey)) / den; MATRIX_ZX(m) = ((ex * dy2) - (dx2 * ey)) / den;
@ -656,7 +656,7 @@ eina_matrix3_quad_square_map(Eina_Matrix3 *m,
eina_matrix3_inverse(&tmp, m); eina_matrix3_inverse(&tmp, m);
/* make the projective matrix3 always have 1 on zz */ /* make the projective matrix3 always have 1 on zz */
if (!EINA_DBL_CMP(MATRIX_ZZ(m), 1.0)) if (!EINA_DBL_EQ(MATRIX_ZZ(m), 1.0))
{ {
eina_matrix3_divide(m, MATRIX_ZZ(m)); eina_matrix3_divide(m, MATRIX_ZZ(m));
} }
@ -989,10 +989,10 @@ eina_matrix4_identity(Eina_Matrix4 *out)
EAPI Eina_Matrix_Type EAPI Eina_Matrix_Type
eina_matrix2_type_get(const Eina_Matrix2 *m) eina_matrix2_type_get(const Eina_Matrix2 *m)
{ {
if (EINA_DBL_CMP(MATRIX_XX(m), 1.0) && if (EINA_DBL_EQ(MATRIX_XX(m), 1.0) &&
EINA_DBL_CMP(MATRIX_XY(m), 0.0) && EINA_DBL_EQ(MATRIX_XY(m), 0.0) &&
EINA_DBL_CMP(MATRIX_YX(m), 0.0) && EINA_DBL_EQ(MATRIX_YX(m), 0.0) &&
EINA_DBL_CMP(MATRIX_YY(m), 1.0)) EINA_DBL_EQ(MATRIX_YY(m), 1.0))
return EINA_MATRIX_TYPE_IDENTITY; return EINA_MATRIX_TYPE_IDENTITY;
return EINA_MATRIX_TYPE_AFFINE; return EINA_MATRIX_TYPE_AFFINE;
} }
@ -1238,7 +1238,7 @@ eina_matrix2_inverse(Eina_Matrix2 *out, const Eina_Matrix2 *mat)
det = MATRIX_XX(mat) * MATRIX_YY(mat) - MATRIX_YX(mat) * MATRIX_XY(mat); det = MATRIX_XX(mat) * MATRIX_YY(mat) - MATRIX_YX(mat) * MATRIX_XY(mat);
if (EINA_DBL_CMP(det, 0.0)) if (EINA_DBL_EQ(det, 0.0))
return; return;
det = 1.0 / det; det = 1.0 / det;

View File

@ -447,12 +447,12 @@ eina_quaternion_lerp(Eina_Quaternion *out,
const Eina_Quaternion *b, const Eina_Quaternion *b,
double pos) double pos)
{ {
if (EINA_DBL_CMP(pos, 0.0)) if (EINA_DBL_EQ(pos, 0.0))
{ {
*out = *a; *out = *a;
return ; return ;
} }
else if (EINA_DBL_CMP(pos, 1.0)) else if (EINA_DBL_EQ(pos, 1.0))
{ {
*out = *b; *out = *b;
return ; return ;
@ -475,12 +475,12 @@ eina_quaternion_slerp(Eina_Quaternion *out,
double dot; double dot;
double pos1, pos2; double pos1, pos2;
if (EINA_DBL_CMP(pos, 0.0)) if (EINA_DBL_EQ(pos, 0.0))
{ {
*out = *a; *out = *a;
return ; return ;
} }
else if (EINA_DBL_CMP(pos, 1.0)) else if (EINA_DBL_EQ(pos, 1.0))
{ {
*out = *b; *out = *b;
return ; return ;
@ -528,12 +528,12 @@ eina_quaternion_nlerp(Eina_Quaternion *out,
Eina_Quaternion not_normalize; Eina_Quaternion not_normalize;
double dot; double dot;
if (EINA_DBL_CMP(pos, 0.0)) if (EINA_DBL_EQ(pos, 0.0))
{ {
*out = *a; *out = *a;
return ; return ;
} }
else if (EINA_DBL_CMP(pos, 1.0)) else if (EINA_DBL_EQ(pos, 1.0))
{ {
*out = *b; *out = *b;
return ; return ;
@ -692,7 +692,7 @@ eina_matrix4_quaternion_to(Eina_Quaternion *rotation,
Eina_Matrix4 n, pm; Eina_Matrix4 n, pm;
double det, factor; double det, factor;
if (EINA_DBL_CMP(m->ww, 0.0)) return EINA_FALSE; if (EINA_DBL_EQ(m->ww, 0.0)) return EINA_FALSE;
// Normalize the matrix. // Normalize the matrix.
factor = 1 / m->ww; factor = 1 / m->ww;
@ -932,7 +932,7 @@ eina_quaternion_matrix4_to(Eina_Matrix4 *m,
// apply skew // apply skew
// rm is a identity 4x4 matrix initially // rm is a identity 4x4 matrix initially
if (!EINA_DBL_CMP(skew->z, 0.0)) if (!EINA_DBL_EQ(skew->z, 0.0))
{ {
Eina_Matrix4 cp; Eina_Matrix4 cp;
@ -943,7 +943,7 @@ eina_quaternion_matrix4_to(Eina_Matrix4 *m,
tmp = cp; tmp = cp;
} }
if (!EINA_DBL_CMP(skew->y, 0.0)) if (!EINA_DBL_EQ(skew->y, 0.0))
{ {
Eina_Matrix4 cp; Eina_Matrix4 cp;
@ -955,7 +955,7 @@ eina_quaternion_matrix4_to(Eina_Matrix4 *m,
tmp = cp; tmp = cp;
} }
if (!EINA_DBL_CMP(skew->x, 0.0)) if (!EINA_DBL_EQ(skew->x, 0.0))
{ {
Eina_Matrix4 cp; Eina_Matrix4 cp;
@ -1029,7 +1029,7 @@ eina_quaternion_copy(Eina_Quaternion *dst, const Eina_Quaternion *src)
EAPI void EAPI void
eina_quaternion_homogeneous_regulate(Eina_Quaternion *out, const Eina_Quaternion *v) eina_quaternion_homogeneous_regulate(Eina_Quaternion *out, const Eina_Quaternion *v)
{ {
if (!EINA_DBL_CMP(v->w, 0.0)) if (!EINA_DBL_EQ(v->w, 0.0))
{ {
double scale = 1.0 / v->w; double scale = 1.0 / v->w;

View File

@ -73,10 +73,11 @@ EAPI Eina_Bool eina_flteq(float a, float b);
* @brief Safe comparison of float * @brief Safe comparison of float
* @param a First member to compar * @param a First member to compar
* @param b Second member to compar * @param b Second member to compar
* @since 1.19
* *
* @return @c true if two floats match * @return @c true if two floats match
*/ */
#define EINA_FLT_CMP(a, b) (fabsf((float)a - (float)b) <= FLT_EPSILON) #define EINA_FLT_EQ(a, b) (!!(fabsf((float)a - (float)b) <= FLT_EPSILON))
/** /**
* @brief Determine if a float is nonzero * @brief Determine if a float is nonzero
@ -91,10 +92,11 @@ EAPI Eina_Bool eina_flteq(float a, float b);
* @brief Safe comparison of double * @brief Safe comparison of double
* @param a First member to compar * @param a First member to compar
* @param b Second member to compar * @param b Second member to compar
* @since 1.19
* *
* @return @c true if two double match * @return @c true if two double match
*/ */
#define EINA_DBL_CMP(a, b) (fabs((double)a - (double)b) <= DBL_EPSILON) #define EINA_DBL_EQ(a, b) (!!(fabs((double)a - (double)b) <= DBL_EPSILON))
/** /**
* @brief Determine if a double is nonzero * @brief Determine if a double is nonzero

View File

@ -156,7 +156,7 @@ _efl_ui_box_custom_layout(Efl_Ui_Box *ui_box, Evas_Object_Box_Data *bd)
if (extra < 0) extra = 0; if (extra < 0) extra = 0;
if (EINA_DBL_CMP(weight[!horiz], 0)) if (EINA_DBL_EQ(weight[!horiz], 0))
{ {
if (box_fill[!horiz]) if (box_fill[!horiz])
{ {

View File

@ -1506,7 +1506,7 @@ _efl_ui_image_align_set(Eo *obj, Efl_Ui_Image_Data *sd, double align_x, double a
else if (align_y < 0.0) else if (align_y < 0.0)
align_y = 0.0; align_y = 0.0;
if ((EINA_DBL_CMP(align_x, sd->align_x)) && (EINA_DBL_CMP(align_y, sd->align_y))) return; if ((EINA_DBL_EQ(align_x, sd->align_x)) && (EINA_DBL_EQ(align_y, sd->align_y))) return;
sd->align_x = align_x; sd->align_x = align_x;
sd->align_y = align_y; sd->align_y = align_y;

View File

@ -1384,12 +1384,12 @@ _box_layout_cb(Evas_Object *o,
efl_gfx_size_hint_combined_min_get(obj, &mnw, &mnh); efl_gfx_size_hint_combined_min_get(obj, &mnw, &mnh);
fw = fh = EINA_FALSE; fw = fh = EINA_FALSE;
if (EINA_DBL_CMP(ax, -1)) {fw = 1; ax = 0.5; } if (EINA_DBL_EQ(ax, -1)) {fw = 1; ax = 0.5; }
if (EINA_DBL_CMP(ay, -1)) {fh = 1; ay = 0.5; } if (EINA_DBL_EQ(ay, -1)) {fh = 1; ay = 0.5; }
if (rtl) ax = 1.0 - ax; if (rtl) ax = 1.0 - ax;
ww = mnw; ww = mnw;
if (!EINA_DBL_CMP(wx, 0)) if (!EINA_DBL_EQ(wx, 0))
{ {
if (ww <= w - linew) ww = w - linew; if (ww <= w - linew) ww = w - linew;
else ww = w; else ww = w;

View File

@ -253,7 +253,7 @@ _update_slider(void *data, const Efl_Event *event EINA_UNUSED)
elm_object_disabled_set(sd->slider, elm_object_disabled_set(sd->slider,
(!seekable) | elm_widget_disabled_get(data)); (!seekable) | elm_widget_disabled_get(data));
elm_slider_min_max_set(sd->slider, 0, length); elm_slider_min_max_set(sd->slider, 0, length);
if ((!EINA_DBL_CMP(elm_slider_value_get(sd->slider), pos)) && if ((!EINA_DBL_EQ(elm_slider_value_get(sd->slider), pos)) &&
(!sd->dragging)) (!sd->dragging))
elm_slider_value_set(sd->slider, pos); elm_slider_value_set(sd->slider, pos);
} }
@ -273,7 +273,7 @@ _update_position(void *data, const Efl_Event *event EINA_UNUSED)
ELM_PLAYER_DATA_GET(data, sd); ELM_PLAYER_DATA_GET(data, sd);
pos = elm_slider_value_get(sd->slider); pos = elm_slider_value_get(sd->slider);
if (!EINA_FLT_CMP(pos, elm_video_play_position_get(sd->video))) if (!EINA_FLT_EQ(pos, elm_video_play_position_get(sd->video)))
elm_video_play_position_set(sd->video, pos); elm_video_play_position_set(sd->video, pos);
} }
@ -298,7 +298,7 @@ _update_volume(void *data, const Efl_Event *event EINA_UNUSED)
ELM_PLAYER_DATA_GET(data, sd); ELM_PLAYER_DATA_GET(data, sd);
vol = elm_slider_value_get(sd->vslider) / 100.0; vol = elm_slider_value_get(sd->vslider) / 100.0;
if (!EINA_DBL_CMP(vol, elm_video_audio_level_get(sd->video))) if (!EINA_DBL_EQ(vol, elm_video_audio_level_get(sd->video)))
elm_video_audio_level_set(sd->video, vol); elm_video_audio_level_set(sd->video, vol);
} }

View File

@ -467,9 +467,9 @@ _elm_popup_elm_layout_sizing_eval(Eo *obj, Elm_Popup_Data *sd)
elm_popup_align_get(obj, &horizontal, &vertical); elm_popup_align_get(obj, &horizontal, &vertical);
evas_object_geometry_get(sd->parent, NULL, NULL, &w, &h); evas_object_geometry_get(sd->parent, NULL, NULL, &w, &h);
if (EINA_DBL_CMP(horizontal, ELM_NOTIFY_ALIGN_FILL)) if (EINA_DBL_EQ(horizontal, ELM_NOTIFY_ALIGN_FILL))
minw = w; minw = w;
if (EINA_DBL_CMP(vertical, ELM_NOTIFY_ALIGN_FILL)) if (EINA_DBL_EQ(vertical, ELM_NOTIFY_ALIGN_FILL))
minh = h; minh = h;
edje_object_size_min_restricted_calc(elm_layout_edje_get(sd->content_area), edje_object_size_min_restricted_calc(elm_layout_edje_get(sd->content_area),
&minw, &minh, minw, minh); &minw, &minh, minw, minh);
@ -1644,23 +1644,23 @@ _elm_notify_orient_get(const Evas_Object *obj)
elm_notify_align_get(obj, &horizontal, &vertical); elm_notify_align_get(obj, &horizontal, &vertical);
if ((EINA_DBL_CMP(horizontal, 0.5)) && (EINA_DBL_CMP(vertical, 0.0))) if ((EINA_DBL_EQ(horizontal, 0.5)) && (EINA_DBL_EQ(vertical, 0.0)))
orient = ELM_NOTIFY_ORIENT_TOP; orient = ELM_NOTIFY_ORIENT_TOP;
else if ((EINA_DBL_CMP(horizontal, 0.5)) && (EINA_DBL_CMP(vertical, 0.5))) else if ((EINA_DBL_EQ(horizontal, 0.5)) && (EINA_DBL_EQ(vertical, 0.5)))
orient = ELM_NOTIFY_ORIENT_CENTER; orient = ELM_NOTIFY_ORIENT_CENTER;
else if ((EINA_DBL_CMP(horizontal, 0.5)) && (EINA_DBL_CMP(vertical, 1.0))) else if ((EINA_DBL_EQ(horizontal, 0.5)) && (EINA_DBL_EQ(vertical, 1.0)))
orient = ELM_NOTIFY_ORIENT_BOTTOM; orient = ELM_NOTIFY_ORIENT_BOTTOM;
else if ((EINA_DBL_CMP(horizontal, 0.0)) && (EINA_DBL_CMP(vertical, 0.5))) else if ((EINA_DBL_EQ(horizontal, 0.0)) && (EINA_DBL_EQ(vertical, 0.5)))
orient = ELM_NOTIFY_ORIENT_LEFT; orient = ELM_NOTIFY_ORIENT_LEFT;
else if ((EINA_DBL_CMP(horizontal, 1.0)) && (EINA_DBL_CMP(vertical, 0.5))) else if ((EINA_DBL_EQ(horizontal, 1.0)) && (EINA_DBL_EQ(vertical, 0.5)))
orient = ELM_NOTIFY_ORIENT_RIGHT; orient = ELM_NOTIFY_ORIENT_RIGHT;
else if ((EINA_DBL_CMP(horizontal, 0.0)) && (EINA_DBL_CMP(vertical, 0.0))) else if ((EINA_DBL_EQ(horizontal, 0.0)) && (EINA_DBL_EQ(vertical, 0.0)))
orient = ELM_NOTIFY_ORIENT_TOP_LEFT; orient = ELM_NOTIFY_ORIENT_TOP_LEFT;
else if ((EINA_DBL_CMP(horizontal, 1.0)) && (EINA_DBL_CMP(vertical, 0.0))) else if ((EINA_DBL_EQ(horizontal, 1.0)) && (EINA_DBL_EQ(vertical, 0.0)))
orient = ELM_NOTIFY_ORIENT_TOP_RIGHT; orient = ELM_NOTIFY_ORIENT_TOP_RIGHT;
else if ((EINA_DBL_CMP(horizontal, 0.0)) && (EINA_DBL_CMP(vertical, 1.0))) else if ((EINA_DBL_EQ(horizontal, 0.0)) && (EINA_DBL_EQ(vertical, 1.0)))
orient = ELM_NOTIFY_ORIENT_BOTTOM_LEFT; orient = ELM_NOTIFY_ORIENT_BOTTOM_LEFT;
else if ((EINA_DBL_CMP(horizontal, 1.0)) && (EINA_DBL_CMP(vertical, 1.0))) else if ((EINA_DBL_EQ(horizontal, 1.0)) && (EINA_DBL_EQ(vertical, 1.0)))
orient = ELM_NOTIFY_ORIENT_BOTTOM_RIGHT; orient = ELM_NOTIFY_ORIENT_BOTTOM_RIGHT;
else else
orient = ELM_NOTIFY_ORIENT_TOP; orient = ELM_NOTIFY_ORIENT_TOP;

View File

@ -156,10 +156,10 @@ _drag_button_move_cb(void *data,
edje_object_part_drag_value_get edje_object_part_drag_value_get
(wd->resize_obj, "elm.drag_button_base", &pos, NULL); (wd->resize_obj, "elm.drag_button_base", &pos, NULL);
if (EINA_DBL_CMP(pos, 0.0)) if (EINA_DBL_EQ(pos, 0.0))
efl_event_callback_legacy_call efl_event_callback_legacy_call
(obj, ELM_ACTIONSLIDER_EVENT_POS_CHANGED, !elm_widget_mirrored_get(obj) ? "left" : "right"); (obj, ELM_ACTIONSLIDER_EVENT_POS_CHANGED, !elm_widget_mirrored_get(obj) ? "left" : "right");
else if (EINA_DBL_CMP(pos, 1.0)) else if (EINA_DBL_EQ(pos, 1.0))
efl_event_callback_legacy_call efl_event_callback_legacy_call
(obj, ELM_ACTIONSLIDER_EVENT_POS_CHANGED, !elm_widget_mirrored_get(obj) ? "right" : "left"); (obj, ELM_ACTIONSLIDER_EVENT_POS_CHANGED, !elm_widget_mirrored_get(obj) ? "right" : "left");
else if (pos >= 0.45 && pos <= 0.55) else if (pos >= 0.45 && pos <= 0.55)
@ -199,8 +199,8 @@ _button_animator(void *data)
adjusted_final = (!elm_widget_mirrored_get(obj)) ? adjusted_final = (!elm_widget_mirrored_get(obj)) ?
sd->final_position : 1.0 - sd->final_position; sd->final_position : 1.0 - sd->final_position;
if ((EINA_DBL_CMP(adjusted_final, 0.0)) || if ((EINA_DBL_EQ(adjusted_final, 0.0)) ||
(EINA_DBL_CMP(adjusted_final, 0.5) && cur_position >= adjusted_final)) (EINA_DBL_EQ(adjusted_final, 0.5) && cur_position >= adjusted_final))
{ {
new_position = cur_position - move_amount; new_position = cur_position - move_amount;
@ -210,8 +210,8 @@ _button_animator(void *data)
flag_finish_animation = EINA_TRUE; flag_finish_animation = EINA_TRUE;
} }
} }
else if ((EINA_DBL_CMP(adjusted_final, 1.0)) || else if ((EINA_DBL_EQ(adjusted_final, 1.0)) ||
(EINA_DBL_CMP(adjusted_final, 0.5) && cur_position < adjusted_final)) (EINA_DBL_EQ(adjusted_final, 0.5) && cur_position < adjusted_final))
{ {
new_position = cur_position + move_amount; new_position = cur_position + move_amount;
@ -232,15 +232,15 @@ _button_animator(void *data)
_text_get(obj, &left, &right, &center); _text_get(obj, &left, &right, &center);
if ((!EINA_DBL_CMP(sd->final_position, 0)) && if ((!EINA_DBL_EQ(sd->final_position, 0)) &&
(sd->enabled_position & ELM_ACTIONSLIDER_LEFT)) (sd->enabled_position & ELM_ACTIONSLIDER_LEFT))
efl_event_callback_legacy_call efl_event_callback_legacy_call
(obj, EFL_UI_EVENT_SELECTED, (char *)left); (obj, EFL_UI_EVENT_SELECTED, (char *)left);
else if ((EINA_DBL_CMP(sd->final_position, 0.5)) && else if ((EINA_DBL_EQ(sd->final_position, 0.5)) &&
(sd->enabled_position & ELM_ACTIONSLIDER_CENTER)) (sd->enabled_position & ELM_ACTIONSLIDER_CENTER))
efl_event_callback_legacy_call efl_event_callback_legacy_call
(obj, EFL_UI_EVENT_SELECTED, (char *)center); (obj, EFL_UI_EVENT_SELECTED, (char *)center);
else if ((EINA_DBL_CMP(sd->final_position, 1)) && else if ((EINA_DBL_EQ(sd->final_position, 1)) &&
(sd->enabled_position & ELM_ACTIONSLIDER_RIGHT)) (sd->enabled_position & ELM_ACTIONSLIDER_RIGHT))
efl_event_callback_legacy_call efl_event_callback_legacy_call
(obj, EFL_UI_EVENT_SELECTED, (char *)right); (obj, EFL_UI_EVENT_SELECTED, (char *)right);
@ -276,8 +276,8 @@ _drag_button_up_cb(void *data,
_text_get(obj, &left, &right, &center); _text_get(obj, &left, &right, &center);
if ((sd->enabled_position & ELM_ACTIONSLIDER_LEFT) && if ((sd->enabled_position & ELM_ACTIONSLIDER_LEFT) &&
((!elm_widget_mirrored_get(obj) && EINA_DBL_CMP(position, 0.0)) || ((!elm_widget_mirrored_get(obj) && EINA_DBL_EQ(position, 0.0)) ||
(elm_widget_mirrored_get(obj) && EINA_DBL_CMP(position, 1.0)))) (elm_widget_mirrored_get(obj) && EINA_DBL_EQ(position, 1.0))))
{ {
sd->final_position = 0; sd->final_position = 0;
efl_event_callback_legacy_call efl_event_callback_legacy_call
@ -300,8 +300,8 @@ _drag_button_up_cb(void *data,
} }
if ((sd->enabled_position & ELM_ACTIONSLIDER_RIGHT) && if ((sd->enabled_position & ELM_ACTIONSLIDER_RIGHT) &&
((!elm_widget_mirrored_get(obj) && EINA_DBL_CMP(position, 1)) || ((!elm_widget_mirrored_get(obj) && EINA_DBL_EQ(position, 1)) ||
(elm_widget_mirrored_get(obj) && EINA_DBL_CMP(position, 0)))) (elm_widget_mirrored_get(obj) && EINA_DBL_EQ(position, 0))))
{ {
sd->final_position = 1; sd->final_position = 1;
efl_event_callback_legacy_call efl_event_callback_legacy_call
@ -370,7 +370,7 @@ _track_move_cb(void *data,
if (!strcmp(emission, "elm,action,down,right")) if (!strcmp(emission, "elm,action,down,right"))
{ {
if (EINA_DBL_CMP(sd->final_position, 0.0)) if (EINA_DBL_EQ(sd->final_position, 0.0))
{ {
if (sd->enabled_position & ELM_ACTIONSLIDER_CENTER) if (sd->enabled_position & ELM_ACTIONSLIDER_CENTER)
{ {
@ -385,7 +385,7 @@ _track_move_cb(void *data,
sd->final_position = 1.0; sd->final_position = 1.0;
} }
} }
else if (EINA_DBL_CMP(sd->final_position, 0.5) && else if (EINA_DBL_EQ(sd->final_position, 0.5) &&
(sd->enabled_position & ELM_ACTIONSLIDER_RIGHT)) (sd->enabled_position & ELM_ACTIONSLIDER_RIGHT))
{ {
efl_event_callback_legacy_call efl_event_callback_legacy_call
@ -404,7 +404,7 @@ _track_move_cb(void *data,
} }
else else
{ {
if (EINA_DBL_CMP(sd->final_position, 1.0)) if (EINA_DBL_EQ(sd->final_position, 1.0))
{ {
if (sd->enabled_position & ELM_ACTIONSLIDER_CENTER) if (sd->enabled_position & ELM_ACTIONSLIDER_CENTER)
{ {
@ -419,7 +419,7 @@ _track_move_cb(void *data,
sd->final_position = 0.0; sd->final_position = 0.0;
} }
} }
else if (EINA_DBL_CMP(sd->final_position, 0.5) && else if (EINA_DBL_EQ(sd->final_position, 0.5) &&
(sd->enabled_position & ELM_ACTIONSLIDER_LEFT)) (sd->enabled_position & ELM_ACTIONSLIDER_LEFT))
{ {
efl_event_callback_legacy_call efl_event_callback_legacy_call
@ -621,15 +621,15 @@ _elm_actionslider_selected_label_get(Eo *obj, Elm_Actionslider_Data *sd)
_text_get(obj, &left, &right, &center); _text_get(obj, &left, &right, &center);
if ((EINA_DBL_CMP(sd->final_position, 0.0)) && if ((EINA_DBL_EQ(sd->final_position, 0.0)) &&
(sd->enabled_position & ELM_ACTIONSLIDER_LEFT)) (sd->enabled_position & ELM_ACTIONSLIDER_LEFT))
ret = left; ret = left;
if ((EINA_DBL_CMP(sd->final_position, 0.5)) && if ((EINA_DBL_EQ(sd->final_position, 0.5)) &&
(sd->enabled_position & ELM_ACTIONSLIDER_CENTER)) (sd->enabled_position & ELM_ACTIONSLIDER_CENTER))
ret = center; ret = center;
if ((EINA_DBL_CMP(sd->final_position, 1.0)) && if ((EINA_DBL_EQ(sd->final_position, 1.0)) &&
(sd->enabled_position & ELM_ACTIONSLIDER_RIGHT)) (sd->enabled_position & ELM_ACTIONSLIDER_RIGHT))
ret = right; ret = right;

View File

@ -382,7 +382,7 @@ _elm_button_autorepeat_initial_timeout_set(Eo *obj, Elm_Button_Data *sd, double
return; return;
} }
if (EINA_DBL_CMP(sd->ar_initial_timeout, t)) return; if (EINA_DBL_EQ(sd->ar_initial_timeout, t)) return;
ELM_SAFE_FREE(sd->timer, ecore_timer_del); ELM_SAFE_FREE(sd->timer, ecore_timer_del);
sd->ar_initial_timeout = t; sd->ar_initial_timeout = t;
} }
@ -405,7 +405,7 @@ _elm_button_autorepeat_gap_timeout_set(Eo *obj, Elm_Button_Data *sd, double t)
return; return;
} }
if (EINA_DBL_CMP(sd->ar_gap_timeout, t)) return; if (EINA_DBL_EQ(sd->ar_gap_timeout, t)) return;
sd->ar_gap_timeout = t; sd->ar_gap_timeout = t;
if ((sd->repeating) && (sd->timer)) ecore_timer_interval_set(sd->timer, t); if ((sd->repeating) && (sd->timer)) ecore_timer_interval_set(sd->timer, t);

View File

@ -5499,7 +5499,7 @@ _cont_obj_anim_start(void *data)
_drag_anim_start(st); _drag_anim_start(st);
else else
{ {
if (!EINA_DBL_CMP(st->anim_tm, 0.0)) if (!EINA_DBL_EQ(st->anim_tm, 0.0))
{ {
// even if we don't manage the icons animation, we have // even if we don't manage the icons animation, we have
// to wait until it is finished before beginning drag. // to wait until it is finished before beginning drag.

View File

@ -2946,7 +2946,7 @@ _kml_parse(Elm_Map_Route *r)
} }
fclose(f); fclose(f);
if (!EINA_DBL_CMP(dump.distance, 0)) r->info.distance = dump.distance; if (!EINA_DBL_EQ(dump.distance, 0)) r->info.distance = dump.distance;
if (dump.description) if (dump.description)
{ {
eina_stringshare_replace(&r->info.waypoints, dump.description); eina_stringshare_replace(&r->info.waypoints, dump.description);

View File

@ -100,8 +100,8 @@ _elm_panes_elm_widget_focus_next(Eo *obj, Elm_Panes_Data *sd, Elm_Focus_Directio
left = elm_layout_content_get(obj, "left"); left = elm_layout_content_get(obj, "left");
right = elm_layout_content_get(obj, "right"); right = elm_layout_content_get(obj, "right");
if (((sd->orientation == EFL_ORIENT_HORIZONTAL) && (EINA_DBL_CMP(h, 0.0))) || if (((sd->orientation == EFL_ORIENT_HORIZONTAL) && (EINA_DBL_EQ(h, 0.0))) ||
((sd->orientation == EFL_ORIENT_VERTICAL) && (EINA_DBL_CMP(w, 0.0)))) ((sd->orientation == EFL_ORIENT_VERTICAL) && (EINA_DBL_EQ(w, 0.0))))
{ {
return elm_widget_focus_next_get(right, dir, next, next_item); return elm_widget_focus_next_get(right, dir, next, next_item);
} }

View File

@ -1859,7 +1859,7 @@ _elm_photocam_zoom_set(Eo *obj, Elm_Photocam_Data *sd, double zoom)
Eina_Bool an = EINA_FALSE; Eina_Bool an = EINA_FALSE;
if (zoom <= (1.0 / 256.0)) zoom = (1.0 / 256.0); if (zoom <= (1.0 / 256.0)) zoom = (1.0 / 256.0);
if (EINA_DBL_CMP(zoom, sd->zoom)) return; if (EINA_DBL_EQ(zoom, sd->zoom)) return;
sd->zoom = zoom; sd->zoom = zoom;
sd->size.ow = sd->size.w; sd->size.ow = sd->size.w;
@ -1897,7 +1897,7 @@ _elm_photocam_zoom_set(Eo *obj, Elm_Photocam_Data *sd, double zoom)
z = (double)sd->size.imw / pw; z = (double)sd->size.imw / pw;
else else
z = (double)sd->size.imh / ph; z = (double)sd->size.imh / ph;
if (!EINA_DBL_CMP(z, sd->zoom)) if (!EINA_DBL_EQ(z, sd->zoom))
zoom_changed = 1; zoom_changed = 1;
sd->zoom = z; sd->zoom = z;
sd->size.nw = pw; sd->size.nw = pw;
@ -1943,7 +1943,7 @@ _elm_photocam_zoom_set(Eo *obj, Elm_Photocam_Data *sd, double zoom)
} }
else if ((sd->size.imw < rw) && (sd->size.imh < rh)) else if ((sd->size.imw < rw) && (sd->size.imh < rh))
{ {
if (!EINA_DBL_CMP(sd->zoom, 1)) zoom_changed = 1; if (!EINA_DBL_EQ(sd->zoom, 1)) zoom_changed = 1;
sd->zoom = 1; sd->zoom = 1;
sd->size.nw = sd->size.imw; sd->size.nw = sd->size.imw;
sd->size.nh = sd->size.imh; sd->size.nh = sd->size.imh;
@ -1962,7 +1962,7 @@ _elm_photocam_zoom_set(Eo *obj, Elm_Photocam_Data *sd, double zoom)
z = (double)sd->size.imw / pw; z = (double)sd->size.imw / pw;
else else
z = (double)sd->size.imh / ph; z = (double)sd->size.imh / ph;
if (EINA_DBL_CMP(z, sd->zoom)) if (EINA_DBL_EQ(z, sd->zoom))
zoom_changed = 1; zoom_changed = 1;
sd->zoom = z; sd->zoom = z;
sd->size.nw = pw; sd->size.nw = pw;

View File

@ -425,7 +425,7 @@ _elm_progressbar_efl_ui_progress_span_size_get(Eo *obj EINA_UNUSED, Elm_Progress
EOLIAN static void EOLIAN static void
_elm_progressbar_efl_ui_progress_progress_value_set(Eo *obj, Elm_Progressbar_Data *sd, double val) _elm_progressbar_efl_ui_progress_progress_value_set(Eo *obj, Elm_Progressbar_Data *sd, double val)
{ {
if (EINA_DBL_CMP(sd->val, val)) return; if (EINA_DBL_EQ(sd->val, val)) return;
elm_progressbar_part_value_set(obj, "elm.cur.progressbar", val); elm_progressbar_part_value_set(obj, "elm.cur.progressbar", val);
} }

View File

@ -148,7 +148,7 @@ _key_action_move(Evas_Object *obj, const char *params)
cur_weight += ((f_x - c_x) - x) * ((f_x - c_x) - x); cur_weight += ((f_x - c_x) - x) * ((f_x - c_x) - x);
if ((f_y - c_y) > y) if ((f_y - c_y) > y)
cur_weight += ((f_y - c_y) - y) * ((f_y - c_y) - y); cur_weight += ((f_y - c_y) - y) * ((f_y - c_y) - y);
if (EINA_DBL_CMP(cur_weight, 0.0)) if (EINA_DBL_EQ(cur_weight, 0.0))
{ {
elm_widget_focus_steal(cur, NULL); elm_widget_focus_steal(cur, NULL);
eina_list_free(can_focus_list); eina_list_free(can_focus_list);

View File

@ -358,7 +358,7 @@ _thumb_start(Elm_Thumb_Data *sd)
ethumb_client_orientation_set(_elm_ethumb_client, sd->thumb.orient); ethumb_client_orientation_set(_elm_ethumb_client, sd->thumb.orient);
if (sd->thumb.tw && sd->thumb.th) if (sd->thumb.tw && sd->thumb.th)
ethumb_client_size_set(_elm_ethumb_client, sd->thumb.tw, sd->thumb.th); ethumb_client_size_set(_elm_ethumb_client, sd->thumb.tw, sd->thumb.th);
if (!EINA_DBL_CMP(sd->thumb.cropx, 0) && !EINA_DBL_CMP(sd->thumb.cropy, 0)) if (!EINA_DBL_EQ(sd->thumb.cropx, 0) && !EINA_DBL_EQ(sd->thumb.cropy, 0))
ethumb_client_crop_align_set(_elm_ethumb_client, sd->thumb.cropx, sd->thumb.cropy); ethumb_client_crop_align_set(_elm_ethumb_client, sd->thumb.cropx, sd->thumb.cropy);
if (sd->thumb.quality) if (sd->thumb.quality)
ethumb_client_quality_set(_elm_ethumb_client, sd->thumb.quality); ethumb_client_quality_set(_elm_ethumb_client, sd->thumb.quality);

View File

@ -125,9 +125,9 @@ _embryo_fp_div(Embryo_Program *ep EINA_UNUSED, Embryo_Cell *params)
if (params[0] != (2 * sizeof(Embryo_Cell))) return 0; if (params[0] != (2 * sizeof(Embryo_Cell))) return 0;
f = EMBRYO_CELL_TO_FLOAT(params[1]); f = EMBRYO_CELL_TO_FLOAT(params[1]);
ff = EMBRYO_CELL_TO_FLOAT(params[2]); ff = EMBRYO_CELL_TO_FLOAT(params[2]);
if (EINA_FLT_CMP(ff, 0.0)) if (EINA_FLT_EQ(ff, 0.0))
{ {
if (EINA_FLT_CMP(f, 0.0)) if (EINA_FLT_EQ(f, 0.0))
return EMBRYO_FLOAT_TO_CELL(0.0f); return EMBRYO_FLOAT_TO_CELL(0.0f);
else if (f < 0.0) else if (f < 0.0)
return EMBRYO_FLOAT_TO_CELL(-MAXFLOAT); return EMBRYO_FLOAT_TO_CELL(-MAXFLOAT);
@ -217,7 +217,7 @@ _embryo_fp_cmp(Embryo_Program *ep EINA_UNUSED, Embryo_Cell *params)
if (params[0] != (2 * sizeof(Embryo_Cell))) return 0; if (params[0] != (2 * sizeof(Embryo_Cell))) return 0;
f = EMBRYO_CELL_TO_FLOAT(params[1]); f = EMBRYO_CELL_TO_FLOAT(params[1]);
ff = EMBRYO_CELL_TO_FLOAT(params[2]); ff = EMBRYO_CELL_TO_FLOAT(params[2]);
if (EINA_FLT_CMP(f, ff)) return 0; if (EINA_FLT_EQ(f, ff)) return 0;
else if (f > ff) else if (f > ff)
return 1; return 1;
return -1; return -1;
@ -269,14 +269,14 @@ _embryo_fp_log(Embryo_Program *ep, Embryo_Cell *params)
embryo_program_error_set(ep, EMBRYO_ERROR_DOMAIN); embryo_program_error_set(ep, EMBRYO_ERROR_DOMAIN);
return 0; return 0;
} }
if (EINA_FLT_CMP(ff, 10.0)) if (EINA_FLT_EQ(ff, 10.0))
f = log10f(f); f = log10f(f);
else if (EINA_FLT_CMP(ff, 2.0)) else if (EINA_FLT_EQ(ff, 2.0))
f = log2f(f); f = log2f(f);
else else
{ {
tf = logf(ff); tf = logf(ff);
if (EINA_FLT_CMP(tf, 0.0)) if (EINA_FLT_EQ(tf, 0.0))
f = 0.0; f = 0.0;
else f = (logf(f) / tf); else f = (logf(f) / tf);
} }

View File

@ -1540,8 +1540,8 @@ _emotion_video_pos_update(Evas_Object *obj, double pos, double len)
int npos = 0, nlen = 0; int npos = 0, nlen = 0;
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME); E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
if (!EINA_DBL_CMP(pos, sd->pos)) npos = 1; if (!EINA_DBL_EQ(pos, sd->pos)) npos = 1;
if (!EINA_DBL_CMP(len, sd->len)) nlen = 1; if (!EINA_DBL_EQ(len, sd->len)) nlen = 1;
sd->pos = pos; sd->pos = pos;
sd->len = len; sd->len = len;
if (npos) if (npos)
@ -1573,8 +1573,8 @@ _emotion_frame_resize(Evas_Object *obj, int w, int h, double ratio)
} }
if (h > 0) tmp = (double)w / (double)h; if (h > 0) tmp = (double)w / (double)h;
else tmp = 1.0; else tmp = 1.0;
if (!EINA_DBL_CMP(ratio, tmp)) tmp = ratio; if (!EINA_DBL_EQ(ratio, tmp)) tmp = ratio;
if (!EINA_DBL_CMP(tmp, sd->ratio)) if (!EINA_DBL_EQ(tmp, sd->ratio))
{ {
sd->ratio = tmp; sd->ratio = tmp;
changed = 1; changed = 1;
@ -1619,7 +1619,7 @@ _emotion_open_done(Evas_Object *obj)
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME); E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
sd->open = 1; sd->open = 1;
if (!EINA_DBL_CMP(sd->remember_jump, 0.0)) if (!EINA_DBL_EQ(sd->remember_jump, 0.0))
emotion_object_position_set(obj, sd->remember_jump); emotion_object_position_set(obj, sd->remember_jump);
if (sd->remember_play != sd->play) if (sd->remember_play != sd->play)
emotion_object_play_set(obj, sd->remember_play); emotion_object_play_set(obj, sd->remember_play);
@ -1737,8 +1737,8 @@ _emotion_frame_refill(Evas_Object *obj, double w, double h)
Efl_Canvas_Video_Data *sd; Efl_Canvas_Video_Data *sd;
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME); E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
if ((!EINA_DBL_CMP(sd->fill.w, w)) || if ((!EINA_DBL_EQ(sd->fill.w, w)) ||
(!EINA_DBL_CMP(sd->fill.h, h))) (!EINA_DBL_EQ(sd->fill.h, h)))
{ {
Evas_Coord ow, oh; Evas_Coord ow, oh;

View File

@ -1151,7 +1151,7 @@ ethumb_calculate_aspect_from_ratio(Ethumb *e, float ia, int *w, int *h)
*w = e->tw; *w = e->tw;
*h = e->th; *h = e->th;
if (EINA_FLT_CMP(ia, 0)) if (EINA_FLT_EQ(ia, 0))
return; return;
a = e->tw / (float)e->th; a = e->tw / (float)e->th;
@ -1190,7 +1190,7 @@ ethumb_calculate_fill_from_ratio(Ethumb *e, float ia, int *fx, int *fy, int *fw,
*fx = 0; *fx = 0;
*fy = 0; *fy = 0;
if (EINA_FLT_CMP(ia, 0)) if (EINA_FLT_EQ(ia, 0))
return; return;
a = e->tw / (float)e->th; a = e->tw / (float)e->th;
@ -1739,7 +1739,7 @@ ethumb_dup(const Ethumb *e)
if (e1->Param != e2->Param) \ if (e1->Param != e2->Param) \
return EINA_TRUE; return EINA_TRUE;
#define CHECK_FLT_DELTA(Param) \ #define CHECK_FLT_DELTA(Param) \
if (!EINA_FLT_CMP(e1->Param, e2->Param)) \ if (!EINA_FLT_EQ(e1->Param, e2->Param)) \
return EINA_TRUE; return EINA_TRUE;
EAPI Eina_Bool EAPI Eina_Bool
@ -1780,7 +1780,7 @@ ethumb_length(EINA_UNUSED const void *key)
return e1->Param - e2->Param; return e1->Param - e2->Param;
#define CMP_FLT_PARAM(Param) \ #define CMP_FLT_PARAM(Param) \
if (!EINA_FLT_CMP(e1->Param, e2->Param)) \ if (!EINA_FLT_EQ(e1->Param, e2->Param)) \
return e1->Param - e2->Param; return e1->Param - e2->Param;
EAPI int EAPI int

View File

@ -744,7 +744,7 @@ _evas_cache_image_loadopts_append(char *hkey, Evas_Image_Load_Opts **plo)
if ((!lo) || if ((!lo) ||
(lo && (lo &&
(lo->emile.scale_down_by == 0) && (lo->emile.scale_down_by == 0) &&
(EINA_DBL_CMP(lo->emile.dpi, 0.0)) && (EINA_DBL_EQ(lo->emile.dpi, 0.0)) &&
((lo->emile.w == 0) || (lo->emile.h == 0)) && ((lo->emile.w == 0) || (lo->emile.h == 0)) &&
((lo->emile.region.w == 0) || (lo->emile.region.h == 0)) && ((lo->emile.region.w == 0) || (lo->emile.region.h == 0)) &&
(lo->emile.orientation == 0) (lo->emile.orientation == 0)

View File

@ -693,7 +693,7 @@ evas_cache2_image_open(Evas_Cache2 *cache, const char *path, const char *key,
if ((!lo) || if ((!lo) ||
(lo && (lo &&
(lo->emile.scale_down_by == 0) && (lo->emile.scale_down_by == 0) &&
(EINA_DBL_CMP(lo->emile.dpi, 0.0)) && (EINA_DBL_EQ(lo->emile.dpi, 0.0)) &&
((lo->emile.w == 0) || (lo->emile.h == 0)) && ((lo->emile.w == 0) || (lo->emile.h == 0)) &&
((lo->emile.region.w == 0) || (lo->emile.region.h == 0)) && ((lo->emile.region.w == 0) || (lo->emile.region.h == 0)) &&
((lo->emile.scale_load.dst_w == 0) || (lo->emile.scale_load.dst_h == 0)) && ((lo->emile.scale_load.dst_w == 0) || (lo->emile.scale_load.dst_h == 0)) &&

View File

@ -197,7 +197,7 @@ _evas_image_load_dpi_set(Eo *eo_obj, double dpi)
Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS); Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS);
Evas_Image_Data *o = efl_data_scope_get(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS); Evas_Image_Data *o = efl_data_scope_get(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
if (EINA_DBL_CMP(dpi, o->load_opts->dpi)) return; if (EINA_DBL_EQ(dpi, o->load_opts->dpi)) return;
evas_object_async_block(obj); evas_object_async_block(obj);
EINA_COW_LOAD_OPTS_WRITE_BEGIN(o, low) EINA_COW_LOAD_OPTS_WRITE_BEGIN(o, low)
low->dpi = dpi; low->dpi = dpi;

View File

@ -485,7 +485,7 @@ _efl_input_pointer_value_set(Eo *obj EINA_UNUSED, Efl_Input_Pointer_Data *pd, Ef
return EINA_FALSE; // TODO return EINA_FALSE; // TODO
case EFL_INPUT_VALUE_WHEEL_DIRECTION: case EFL_INPUT_VALUE_WHEEL_DIRECTION:
if (EINA_DBL_CMP(val, 0.0)) if (EINA_DBL_EQ(val, 0.0))
pd->wheel.dir = EFL_ORIENT_VERTICAL; pd->wheel.dir = EFL_ORIENT_VERTICAL;
else else
pd->wheel.dir = EFL_ORIENT_HORIZONTAL; pd->wheel.dir = EFL_ORIENT_HORIZONTAL;

View File

@ -833,7 +833,7 @@ _evas_canvas3d_mesh_alpha_func_set(Eo *obj, Evas_Canvas3D_Mesh_Data *pd, Evas_Ca
Evas_Real ref_value) Evas_Real ref_value)
{ {
if (pd->alpha_comparison == comparison && if (pd->alpha_comparison == comparison &&
(EINA_DBL_CMP(pd->alpha_ref_value, ref_value))) (EINA_DBL_EQ(pd->alpha_ref_value, ref_value)))
return; return;
pd->alpha_comparison = comparison; pd->alpha_comparison = comparison;
pd->alpha_ref_value = ref_value; pd->alpha_ref_value = ref_value;
@ -1116,7 +1116,7 @@ EOLIAN static void
_evas_canvas3d_mesh_shadows_constant_bias_set(Eo *obj EINA_UNUSED, Evas_Canvas3D_Mesh_Data *pd, _evas_canvas3d_mesh_shadows_constant_bias_set(Eo *obj EINA_UNUSED, Evas_Canvas3D_Mesh_Data *pd,
Evas_Real bias) Evas_Real bias)
{ {
if (!EINA_DBL_CMP(pd->shadows_constant_bias, bias)) if (!EINA_DBL_EQ(pd->shadows_constant_bias, bias))
{ {
pd->shadows_constant_bias = bias; pd->shadows_constant_bias = bias;
evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_MESH_SHADOWS_CONSTANT_BIAS, NULL); evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_MESH_SHADOWS_CONSTANT_BIAS, NULL);

View File

@ -34,9 +34,9 @@ _generate_unic_color_key(Evas_Color *color, Evas_Color *bg_color, Evas_Canvas3D_
GET_NEXT_COLOR GET_NEXT_COLOR
/*Get another color if color equal with background color*/ /*Get another color if color equal with background color*/
if ((EINA_DBL_CMP(bg_color->r, (double)red)) && if ((EINA_DBL_EQ(bg_color->r, (double)red)) &&
(EINA_DBL_CMP(bg_color->g, (double)green)) && (EINA_DBL_EQ(bg_color->g, (double)green)) &&
(EINA_DBL_CMP(bg_color->b, (double)blue))) (EINA_DBL_EQ(bg_color->b, (double)blue)))
{ {
GET_NEXT_COLOR GET_NEXT_COLOR
} }

View File

@ -136,8 +136,8 @@ _evas_canvas3d_primitive_tex_scale_set(Eo *obj EINA_UNUSED,
Evas_Real x, Evas_Real x,
Evas_Real y) Evas_Real y)
{ {
if (!EINA_DBL_CMP(x, 0.0)) pd->tex_scale.x = x; if (!EINA_DBL_EQ(x, 0.0)) pd->tex_scale.x = x;
if (!EINA_DBL_CMP(y, 0.0)) pd->tex_scale.y = y; if (!EINA_DBL_EQ(y, 0.0)) pd->tex_scale.y = y;
} }
EOLIAN static void EOLIAN static void

View File

@ -489,7 +489,7 @@ _pick_data_mesh_add(Evas_Canvas3D_Pick_Data *data, const Evas_Ray3 *ray,
} }
} }
} }
else if ((EINA_DBL_CMP(pdmesh->index_count, 0.0)) && else if ((EINA_DBL_EQ(pdmesh->index_count, 0.0)) &&
pdmesh->vertex_count != 0) pdmesh->vertex_count != 0)
{ {
if (pdmesh->assembly == EVAS_CANVAS3D_VERTEX_ASSEMBLY_TRIANGLES) if (pdmesh->assembly == EVAS_CANVAS3D_VERTEX_ASSEMBLY_TRIANGLES)

View File

@ -358,9 +358,9 @@ _transform_to_src_space_f(Evas_Object_Protected_Data *obj, Evas_Object_Protected
tmp_x -= obj->cur->geometry.x; tmp_x -= obj->cur->geometry.x;
tmp_y -= obj->cur->geometry.y; tmp_y -= obj->cur->geometry.y;
if (!EINA_DBL_CMP(obj_w, src_w)) if (!EINA_DBL_EQ(obj_w, src_w))
tmp_x = (tmp_x * (src_w / obj_w)); tmp_x = (tmp_x * (src_w / obj_w));
if (!EINA_DBL_CMP(obj_h, src_h)) if (!EINA_DBL_EQ(obj_h, src_h))
tmp_y = (tmp_y * (src_h / obj_h)); tmp_y = (tmp_y * (src_h / obj_h));
tmp_x += src->cur->geometry.x; tmp_x += src->cur->geometry.x;
@ -2777,8 +2777,8 @@ _canvas_event_feed_multi_internal(Evas *eo_e, Evas_Public_Data *e,
evt = efl_input_instance_get(EFL_INPUT_POINTER_CLASS, eo_e, (void **) &ev); evt = efl_input_instance_get(EFL_INPUT_POINTER_CLASS, eo_e, (void **) &ev);
if (!e || !ev) return; if (!e || !ev) return;
if (EINA_DBL_CMP(fx, 0.0)) fx = x; if (EINA_DBL_EQ(fx, 0.0)) fx = x;
if (EINA_DBL_CMP(fy, 0.0)) fy = y; if (EINA_DBL_EQ(fy, 0.0)) fy = y;
ev->action = action; ev->action = action;
ev->tool = d; ev->tool = d;

View File

@ -507,10 +507,10 @@ _efl_canvas_filter_internal_efl_gfx_filter_filter_state_set(Eo *eo_obj, Evas_Fil
evas_object_async_block(obj); evas_object_async_block(obj);
if ((cur_state != pd->data->state.cur.name) || if ((cur_state != pd->data->state.cur.name) ||
(!EINA_DBL_CMP(cur_val, pd->data->state.cur.value)) || (!EINA_DBL_EQ(cur_val, pd->data->state.cur.value)) ||
(next_state != pd->data->state.next.name) || (next_state != pd->data->state.next.name) ||
(!EINA_DBL_CMP(next_val, pd->data->state.next.value)) || (!EINA_DBL_EQ(next_val, pd->data->state.next.value)) ||
(!EINA_DBL_CMP(pos, pd->data->state.pos))) (!EINA_DBL_EQ(pos, pd->data->state.pos)))
{ {
Evas_Object_Filter_Data *fcow = FCOW_BEGIN(pd); Evas_Object_Filter_Data *fcow = FCOW_BEGIN(pd);
fcow->changed = 1; fcow->changed = 1;

View File

@ -1079,7 +1079,7 @@ _map_util_3d_rotate(Evas_Map *m, double dx, double dy, double dz,
y = p->y - cy; y = p->y - cy;
z = p->z - cz; z = p->z - cz;
if (!EINA_DBL_CMP(rz, 0.0)) if (!EINA_DBL_EQ(rz, 0.0))
{ {
xx = x * cos(rz); xx = x * cos(rz);
yy = x * sin(rz); yy = x * sin(rz);
@ -1087,7 +1087,7 @@ _map_util_3d_rotate(Evas_Map *m, double dx, double dy, double dz,
y = yy + (y * cos(rz)); y = yy + (y * cos(rz));
} }
if (!EINA_DBL_CMP(ry, 0.0)) if (!EINA_DBL_EQ(ry, 0.0))
{ {
xx = x * cos(ry); xx = x * cos(ry);
zz = x * sin(ry); zz = x * sin(ry);
@ -1095,7 +1095,7 @@ _map_util_3d_rotate(Evas_Map *m, double dx, double dy, double dz,
z = zz + (z * cos(ry)); z = zz + (z * cos(ry));
} }
if (!EINA_DBL_CMP(rx, 0.0)) if (!EINA_DBL_EQ(rx, 0.0))
{ {
zz = z * cos(rx); zz = z * cos(rx);
yy = z * sin(rx); yy = z * sin(rx);
@ -1195,7 +1195,7 @@ _map_util_3d_lighting(Evas_Map *m,
ln = (nx * nx) + (ny * ny) + (nz * nz); ln = (nx * nx) + (ny * ny) + (nz * nz);
ln = sqrt(ln); ln = sqrt(ln);
if (!EINA_DBL_CMP(ln, 0.0)) if (!EINA_DBL_EQ(ln, 0.0))
{ {
nx /= ln; nx /= ln;
ny /= ln; ny /= ln;
@ -1210,7 +1210,7 @@ _map_util_3d_lighting(Evas_Map *m,
ln = (x * x) + (y * y) + (z * z); ln = (x * x) + (y * y) + (z * z);
ln = sqrt(ln); ln = sqrt(ln);
if (!EINA_DBL_CMP(ln, 0.0)) if (!EINA_DBL_EQ(ln, 0.0))
{ {
x /= ln; x /= ln;
y /= ln; y /= ln;

View File

@ -701,7 +701,7 @@ _evas_box_layout_horizontal(Eo *o, Evas_Object_Box_Data *priv, Evas_Object_Box_D
(opt->obj, &padding_l, &padding_r, NULL, NULL); (opt->obj, &padding_l, &padding_r, NULL, NULL);
req_w += padding_l + padding_r; req_w += padding_l + padding_r;
if (EINA_DBL_CMP(weight_x, 0.0)) if (EINA_DBL_EQ(weight_x, 0.0))
{ {
int child_w; int child_w;
@ -865,7 +865,7 @@ _evas_box_layout_vertical(Eo *o, Evas_Object_Box_Data *priv, Evas_Object_Box_Dat
(opt->obj, NULL, NULL, &padding_t, &padding_b); (opt->obj, NULL, NULL, &padding_t, &padding_b);
req_h += padding_t + padding_b; req_h += padding_t + padding_b;
if (EINA_DBL_CMP(weight_y, 0.0)) if (EINA_DBL_EQ(weight_y, 0.0))
{ {
int child_h; int child_h;
@ -1650,8 +1650,8 @@ _evas_box_layout_stack(Eo *o, Evas_Object_Box_Data *priv, Evas_Object_Box_Data *
EOLIAN static void EOLIAN static void
_evas_box_align_set(Eo *o, Evas_Object_Box_Data *priv, double horizontal, double vertical) _evas_box_align_set(Eo *o, Evas_Object_Box_Data *priv, double horizontal, double vertical)
{ {
if ((EINA_DBL_CMP(priv->align.h, horizontal)) && if ((EINA_DBL_EQ(priv->align.h, horizontal)) &&
(EINA_DBL_CMP(priv->align.v, vertical))) (EINA_DBL_EQ(priv->align.v, vertical)))
return; return;
priv->align.h = horizontal; priv->align.h = horizontal;
priv->align.v = vertical; priv->align.v = vertical;

View File

@ -636,7 +636,7 @@ _efl_canvas_image_internal_efl_image_border_scale_set(Eo *eo_obj, Evas_Image_Dat
{ {
Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS); Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS);
if (EINA_DBL_CMP(scale, o->cur->border.scale)) return; if (EINA_DBL_EQ(scale, o->cur->border.scale)) return;
evas_object_async_block(obj); evas_object_async_block(obj);
EINA_COW_IMAGE_STATE_WRITE_BEGIN(o, state_write) EINA_COW_IMAGE_STATE_WRITE_BEGIN(o, state_write)
state_write->border.scale = scale; state_write->border.scale = scale;
@ -2094,7 +2094,7 @@ _evas_image_render(Eo *eo_obj, Evas_Object_Protected_Data *obj,
else bt--; else bt--;
} }
} }
if (!EINA_DBL_CMP(o->cur->border.scale, 1.0)) if (!EINA_DBL_EQ(o->cur->border.scale, 1.0))
{ {
bsl = ((double)bl * o->cur->border.scale); bsl = ((double)bl * o->cur->border.scale);
bsr = ((double)br * o->cur->border.scale); bsr = ((double)br * o->cur->border.scale);
@ -2360,7 +2360,7 @@ evas_object_image_render_pre(Evas_Object *eo_obj,
(o->cur->border.t != o->prev->border.t) || (o->cur->border.t != o->prev->border.t) ||
(o->cur->border.b != o->prev->border.b) || (o->cur->border.b != o->prev->border.b) ||
(o->cur->border.fill != o->prev->border.fill) || (o->cur->border.fill != o->prev->border.fill) ||
(!EINA_DBL_CMP(o->cur->border.scale, o->prev->border.scale))) (!EINA_DBL_EQ(o->cur->border.scale, o->prev->border.scale)))
{ {
evas_object_render_pre_prev_cur_add(&e->clip_changes, eo_obj, obj); evas_object_render_pre_prev_cur_add(&e->clip_changes, eo_obj, obj);
goto done; goto done;
@ -2784,20 +2784,20 @@ evas_object_image_is_opaque(Evas_Object *eo_obj EINA_UNUSED,
(m->points[2].a == 255) && (m->points[2].a == 255) &&
(m->points[3].a == 255)) (m->points[3].a == 255))
{ {
if (((EINA_DBL_CMP(m->points[0].x, m->points[3].x)) && if (((EINA_DBL_EQ(m->points[0].x, m->points[3].x)) &&
(EINA_DBL_CMP(m->points[1].x, m->points[2].x)) && (EINA_DBL_EQ(m->points[1].x, m->points[2].x)) &&
(EINA_DBL_CMP(m->points[0].y, m->points[1].y)) && (EINA_DBL_EQ(m->points[0].y, m->points[1].y)) &&
(EINA_DBL_CMP(m->points[2].y, m->points[3].y))) || (EINA_DBL_EQ(m->points[2].y, m->points[3].y))) ||
((EINA_DBL_CMP(m->points[0].x, m->points[1].x)) && ((EINA_DBL_EQ(m->points[0].x, m->points[1].x)) &&
(EINA_DBL_CMP(m->points[2].x, m->points[3].x)) && (EINA_DBL_EQ(m->points[2].x, m->points[3].x)) &&
(EINA_DBL_CMP(m->points[0].y, m->points[3].y)) && (EINA_DBL_EQ(m->points[0].y, m->points[3].y)) &&
(EINA_DBL_CMP(m->points[1].y, m->points[2].y)))) (EINA_DBL_EQ(m->points[1].y, m->points[2].y))))
{ {
if ((EINA_DBL_CMP(m->points[0].x, obj->cur->geometry.x)) && if ((EINA_DBL_EQ(m->points[0].x, obj->cur->geometry.x)) &&
(EINA_DBL_CMP(m->points[0].y, obj->cur->geometry.y)) && (EINA_DBL_EQ(m->points[0].y, obj->cur->geometry.y)) &&
(EINA_DBL_CMP(m->points[2].x, (EINA_DBL_EQ(m->points[2].x,
obj->cur->geometry.x + obj->cur->geometry.w)) && obj->cur->geometry.x + obj->cur->geometry.w)) &&
(EINA_DBL_CMP(m->points[2].y, (EINA_DBL_EQ(m->points[2].y,
obj->cur->geometry.y + obj->cur->geometry.h))) obj->cur->geometry.y + obj->cur->geometry.h)))
return o->cur->opaque; return o->cur->opaque;
} }
@ -2880,20 +2880,20 @@ evas_object_image_was_opaque(Evas_Object *eo_obj EINA_UNUSED,
(m->points[2].a == 255) && (m->points[2].a == 255) &&
(m->points[3].a == 255)) (m->points[3].a == 255))
{ {
if (((EINA_DBL_CMP(m->points[0].x, m->points[3].x)) && if (((EINA_DBL_EQ(m->points[0].x, m->points[3].x)) &&
(EINA_DBL_CMP(m->points[1].x, m->points[2].x)) && (EINA_DBL_EQ(m->points[1].x, m->points[2].x)) &&
(EINA_DBL_CMP(m->points[0].y, m->points[1].y)) && (EINA_DBL_EQ(m->points[0].y, m->points[1].y)) &&
(EINA_DBL_CMP(m->points[2].y, m->points[3].y))) || (EINA_DBL_EQ(m->points[2].y, m->points[3].y))) ||
((EINA_DBL_CMP(m->points[0].x, m->points[1].x)) && ((EINA_DBL_EQ(m->points[0].x, m->points[1].x)) &&
(EINA_DBL_CMP(m->points[2].x, m->points[3].x)) && (EINA_DBL_EQ(m->points[2].x, m->points[3].x)) &&
(EINA_DBL_CMP(m->points[0].y, m->points[3].y)) && (EINA_DBL_EQ(m->points[0].y, m->points[3].y)) &&
(EINA_DBL_CMP(m->points[1].y, m->points[2].y)))) (EINA_DBL_EQ(m->points[1].y, m->points[2].y))))
{ {
if ((EINA_DBL_CMP(m->points[0].x, obj->prev->geometry.x)) && if ((EINA_DBL_EQ(m->points[0].x, obj->prev->geometry.x)) &&
(EINA_DBL_CMP(m->points[0].y, obj->prev->geometry.y)) && (EINA_DBL_EQ(m->points[0].y, obj->prev->geometry.y)) &&
(EINA_DBL_CMP(m->points[2].x, (EINA_DBL_EQ(m->points[2].x,
obj->prev->geometry.x + obj->prev->geometry.w)) && obj->prev->geometry.x + obj->prev->geometry.w)) &&
(EINA_DBL_CMP(m->points[2].y, (EINA_DBL_EQ(m->points[2].y,
obj->prev->geometry.y + obj->prev->geometry.h))) obj->prev->geometry.y + obj->prev->geometry.h)))
return o->prev->opaque; return o->prev->opaque;
} }
@ -3118,7 +3118,7 @@ evas_object_image_is_inside(Evas_Object *eo_obj,
bt = imh / 2; bt = imh / 2;
bb = imh - bt; bb = imh - bt;
} }
if (!EINA_DBL_CMP(o->cur->border.scale, 1.0)) if (!EINA_DBL_EQ(o->cur->border.scale, 1.0))
{ {
bsl = ((double)bl * o->cur->border.scale); bsl = ((double)bl * o->cur->border.scale);
bsr = ((double)br * o->cur->border.scale); bsr = ((double)br * o->cur->border.scale);

View File

@ -1564,11 +1564,11 @@ _efl_canvas_object_efl_gfx_size_hint_hint_align_set(Eo *eo_obj, Evas_Object_Prot
evas_object_async_block(obj); evas_object_async_block(obj);
if (EINA_UNLIKELY(!obj->size_hints)) if (EINA_UNLIKELY(!obj->size_hints))
{ {
if (EINA_DBL_CMP(x, 0.5) && EINA_DBL_CMP(y, 0.5)) return; if (EINA_DBL_EQ(x, 0.5) && EINA_DBL_EQ(y, 0.5)) return;
_evas_object_size_hint_alloc(eo_obj, obj); _evas_object_size_hint_alloc(eo_obj, obj);
} }
if ((EINA_DBL_CMP(obj->size_hints->align.x, x)) && if ((EINA_DBL_EQ(obj->size_hints->align.x, x)) &&
(EINA_DBL_CMP(obj->size_hints->align.y, y))) (EINA_DBL_EQ(obj->size_hints->align.y, y)))
return; return;
obj->size_hints->align.x = x; obj->size_hints->align.x = x;
obj->size_hints->align.y = y; obj->size_hints->align.y = y;
@ -1597,11 +1597,11 @@ _efl_canvas_object_efl_gfx_size_hint_hint_weight_set(Eo *eo_obj, Evas_Object_Pro
evas_object_async_block(obj); evas_object_async_block(obj);
if (EINA_UNLIKELY(!obj->size_hints)) if (EINA_UNLIKELY(!obj->size_hints))
{ {
if (EINA_DBL_CMP(x, 0.0) && EINA_DBL_CMP(y, 0.0)) return; if (EINA_DBL_EQ(x, 0.0) && EINA_DBL_EQ(y, 0.0)) return;
_evas_object_size_hint_alloc(eo_obj, obj); _evas_object_size_hint_alloc(eo_obj, obj);
} }
if ((EINA_DBL_CMP(obj->size_hints->weight.x, x)) && if ((EINA_DBL_EQ(obj->size_hints->weight.x, x)) &&
(EINA_DBL_CMP(obj->size_hints->weight.y, y))) (EINA_DBL_EQ(obj->size_hints->weight.y, y)))
return; return;
obj->size_hints->weight.x = x; obj->size_hints->weight.x = x;
obj->size_hints->weight.y = y; obj->size_hints->weight.y = y;
@ -1958,7 +1958,7 @@ EOLIAN static void
_efl_canvas_object_scale_set(Eo *eo_obj, Evas_Object_Protected_Data *obj, double scale) _efl_canvas_object_scale_set(Eo *eo_obj, Evas_Object_Protected_Data *obj, double scale)
{ {
if (obj->delete_me) return; if (obj->delete_me) return;
if (EINA_DBL_CMP(obj->cur->scale, scale)) return; if (EINA_DBL_EQ(obj->cur->scale, scale)) return;
evas_object_async_block(obj); evas_object_async_block(obj);
EINA_COW_STATE_WRITE_BEGIN(obj, state_write, cur) EINA_COW_STATE_WRITE_BEGIN(obj, state_write, cur)

View File

@ -1015,8 +1015,8 @@ _evas_table_homogeneous_get(Eo *o EINA_UNUSED, Evas_Table_Data *priv)
EOLIAN static void EOLIAN static void
_evas_table_align_set(Eo *o, Evas_Table_Data *priv, double horizontal, double vertical) _evas_table_align_set(Eo *o, Evas_Table_Data *priv, double horizontal, double vertical)
{ {
if ((EINA_DBL_CMP(priv->align.h, horizontal)) && if ((EINA_DBL_EQ(priv->align.h, horizontal)) &&
(EINA_DBL_CMP(priv->align.v, vertical))) (EINA_DBL_EQ(priv->align.v, vertical)))
return; return;
priv->align.h = horizontal; priv->align.h = horizontal;
priv->align.v = vertical; priv->align.v = vertical;

View File

@ -215,7 +215,7 @@ _evas_object_text_items_clean(Evas_Object_Protected_Data *obj, Evas_Text_Data *o
(_color_same(&o->cur.glow, &o->prev.glow)) && (_color_same(&o->cur.glow, &o->prev.glow)) &&
(_color_same(&o->cur.glow2, &o->prev.glow2)) && (_color_same(&o->cur.glow2, &o->prev.glow2)) &&
(o->cur.style == o->prev.style) && (o->cur.style == o->prev.style) &&
(EINA_DBL_CMP(obj->cur->scale, obj->prev->scale))) (EINA_DBL_EQ(obj->cur->scale, obj->prev->scale)))
{ {
if ((o->last_computed.ellipsis_start) && if ((o->last_computed.ellipsis_start) &&
(o->last_computed.ellipsis_start == o->items)) (o->last_computed.ellipsis_start == o->items))
@ -696,7 +696,7 @@ _evas_object_text_layout(Evas_Object *eo_obj, Evas_Text_Data *o, Eina_Unicode *t
if (o->items && if (o->items &&
!memcmp(&o->cur, &o->prev, sizeof (o->cur)) && !memcmp(&o->cur, &o->prev, sizeof (o->cur)) &&
o->cur.text == text && o->cur.text == text &&
(EINA_DBL_CMP(obj->cur->scale, obj->prev->scale)) && (EINA_DBL_EQ(obj->cur->scale, obj->prev->scale)) &&
((o->last_computed.advance <= obj->cur->geometry.w && !o->last_computed.ellipsis) || ((o->last_computed.advance <= obj->cur->geometry.w && !o->last_computed.ellipsis) ||
(o->last_computed.w == obj->cur->geometry.w)) && (o->last_computed.w == obj->cur->geometry.w)) &&
!o->changed_paragraph_direction) !o->changed_paragraph_direction)
@ -835,7 +835,7 @@ _evas_object_text_layout(Evas_Object *eo_obj, Evas_Text_Data *o, Eina_Unicode *t
/* Account of the ellipsis item width. As long as ellipsis != 0 /* Account of the ellipsis item width. As long as ellipsis != 0
* we have a left ellipsis. And the same with 1 and right. */ * we have a left ellipsis. And the same with 1 and right. */
if (!EINA_DBL_CMP(o->cur.ellipsis, 0.0)) if (!EINA_DBL_EQ(o->cur.ellipsis, 0.0))
{ {
if (o->last_computed.ellipsis_start) if (o->last_computed.ellipsis_start)
{ {
@ -850,7 +850,7 @@ _evas_object_text_layout(Evas_Object *eo_obj, Evas_Text_Data *o, Eina_Unicode *t
o->last_computed.ellipsis_start = start_ellip_it; o->last_computed.ellipsis_start = start_ellip_it;
ellip_frame -= start_ellip_it->w; ellip_frame -= start_ellip_it->w;
} }
if (!EINA_DBL_CMP(o->cur.ellipsis, 1.0)) if (!EINA_DBL_EQ(o->cur.ellipsis, 1.0))
{ {
/* FIXME: Should take the last item's font and style and etc. *//* weird it's a text, should always have the same style/font */ /* FIXME: Should take the last item's font and style and etc. *//* weird it's a text, should always have the same style/font */
if (o->last_computed.ellipsis_end) if (o->last_computed.ellipsis_end)
@ -1018,7 +1018,7 @@ _evas_text_ellipsis_set(Eo *eo_obj, Evas_Text_Data *o, double ellipsis)
{ {
Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS); Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS);
if (EINA_DBL_CMP(o->cur.ellipsis, ellipsis)) return; if (EINA_DBL_EQ(o->cur.ellipsis, ellipsis)) return;
evas_object_async_block(obj); evas_object_async_block(obj);
o->prev.ellipsis = o->cur.ellipsis; o->prev.ellipsis = o->cur.ellipsis;
@ -2046,8 +2046,8 @@ evas_object_text_render_pre(Evas_Object *eo_obj,
if (((o->cur.ellipsis >= 0.0) && if (((o->cur.ellipsis >= 0.0) &&
((obj->cur->geometry.w != o->last_computed.w) || ((obj->cur->geometry.w != o->last_computed.w) ||
(obj->cur->geometry.h != o->last_computed.h))) || (obj->cur->geometry.h != o->last_computed.h))) ||
(!EINA_DBL_CMP(o->cur.ellipsis, o->prev.ellipsis)) || (!EINA_DBL_EQ(o->cur.ellipsis, o->prev.ellipsis)) ||
(!EINA_DBL_CMP(obj->cur->scale, obj->prev->scale)) || (!EINA_DBL_EQ(obj->cur->scale, obj->prev->scale)) ||
(o->changed_paragraph_direction)) (o->changed_paragraph_direction))
{ {
_evas_object_text_recalc(eo_obj, o->cur.text); _evas_object_text_recalc(eo_obj, o->cur.text);

View File

@ -5358,7 +5358,7 @@ _layout_par(Ctxt *c)
ellip_h_thresh = ascent + descent + maxasc + maxdesc; ellip_h_thresh = ascent + descent + maxasc + maxdesc;
} }
if ((EINA_DBL_CMP(it->format->ellipsis, 1.0)) && (c->h >= 0) && if ((EINA_DBL_EQ(it->format->ellipsis, 1.0)) && (c->h >= 0) &&
((c->y + ellip_h_thresh > ((c->y + ellip_h_thresh >
c->h - c->o->style_pad.t - c->o->style_pad.b) || c->h - c->o->style_pad.t - c->o->style_pad.b) ||
(!it->format->wrap_word && !it->format->wrap_char && (!it->format->wrap_word && !it->format->wrap_char &&
@ -5499,7 +5499,7 @@ _layout_par(Ctxt *c)
{ {
/* FIXME: Should redo the ellipsis handling. /* FIXME: Should redo the ellipsis handling.
* If we can do ellipsis, just cut here. */ * If we can do ellipsis, just cut here. */
if (EINA_DBL_CMP(it->format->ellipsis, 1.0)) if (EINA_DBL_EQ(it->format->ellipsis, 1.0))
{ {
_layout_handle_ellipsis(c, it, i); _layout_handle_ellipsis(c, it, i);
ret = 1; ret = 1;
@ -6825,7 +6825,7 @@ evas_object_textblock_valign_set(Efl_Canvas_Text *eo_obj, double align)
evas_object_async_block(obj); evas_object_async_block(obj);
if (align < 0.0) align = 0.0; if (align < 0.0) align = 0.0;
else if (align > 1.0) align = 1.0; else if (align > 1.0) align = 1.0;
if (EINA_DBL_CMP(o->valign, align)) return; if (EINA_DBL_EQ(o->valign, align)) return;
o->valign = align; o->valign = align;
_evas_textblock_changed(o, eo_obj); _evas_textblock_changed(o, eo_obj);
} }
@ -12807,7 +12807,7 @@ evas_object_textblock_render(Evas_Object *eo_obj EINA_UNUSED,
{ \ { \
Evas_Coord yoff; \ Evas_Coord yoff; \
yoff = ln->baseline; \ yoff = ln->baseline; \
if (!EINA_DBL_CMP(itr->format->valign, -1.0)) \ if (!EINA_DBL_EQ(itr->format->valign, -1.0)) \
{ \ { \
if (itr->type == EVAS_TEXTBLOCK_ITEM_TEXT) \ if (itr->type == EVAS_TEXTBLOCK_ITEM_TEXT) \
{ \ { \
@ -13299,7 +13299,7 @@ evas_object_textblock_coords_recalc(Evas_Object *eo_obj,
// width changed thus we may have to re-wrap or change centering etc. // width changed thus we may have to re-wrap or change centering etc.
(obj->cur->geometry.w != o->last_w) || (obj->cur->geometry.w != o->last_w) ||
// if valign not top OR we have ellipsis, then if height changed we need to re-eval valign or ... spot // if valign not top OR we have ellipsis, then if height changed we need to re-eval valign or ... spot
(((!EINA_DBL_CMP(o->valign, 0.0)) || (o->have_ellipsis)) && (((!EINA_DBL_EQ(o->valign, 0.0)) || (o->have_ellipsis)) &&
( (
((o->formatted.oneline_h == 0) && ((o->formatted.oneline_h == 0) &&
(obj->cur->geometry.h != o->last_h)) || (obj->cur->geometry.h != o->last_h)) ||

View File

@ -748,7 +748,7 @@ evas_object_textgrid_render_pre(Evas_Object *eo_obj,
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, eo_obj, obj); evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, eo_obj, obj);
goto done; goto done;
} }
if (!EINA_DBL_CMP(obj->cur->scale, obj->prev->scale)) if (!EINA_DBL_EQ(obj->cur->scale, obj->prev->scale))
{ {
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, eo_obj, obj); evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, eo_obj, obj);
goto done; goto done;

View File

@ -166,7 +166,7 @@ evas_common_convert_color_hsv_to_rgb(float h, float s, float v, int *r, int *g,
float f; float f;
v *= 255; v *= 255;
if (EINA_FLT_CMP(s, 0.0)) if (EINA_FLT_EQ(s, 0.0))
{ {
if (r) *r = v; if (r) *r = v;
if (g) *g = v; if (g) *g = v;

View File

@ -925,7 +925,7 @@ _evas_image_load_opts_empty(Evas_Image_Load_Opts *lo)
if (!lo) return EINA_TRUE; if (!lo) return EINA_TRUE;
return ((lo->emile.scale_down_by == 0) return ((lo->emile.scale_down_by == 0)
&& (EINA_DBL_CMP(lo->emile.dpi, 0.0)) && (EINA_DBL_EQ(lo->emile.dpi, 0.0))
&& (lo->emile.w == 0) && (lo->emile.h == 0) && (lo->emile.w == 0) && (lo->emile.h == 0)
&& (lo->emile.region.x == 0) && (lo->emile.region.y == 0) && (lo->emile.region.x == 0) && (lo->emile.region.y == 0)
&& (lo->emile.region.w == 0) && (lo->emile.region.h == 0) && (lo->emile.region.w == 0) && (lo->emile.region.h == 0)
@ -946,7 +946,7 @@ _evas_image_load_opts_equal(const Evas_Image_Load_Opts *lo1,
const Evas_Image_Load_Opts *lo2) const Evas_Image_Load_Opts *lo2)
{ {
return ((lo1->emile.scale_down_by == lo2->emile.scale_down_by) return ((lo1->emile.scale_down_by == lo2->emile.scale_down_by)
&& (EINA_DBL_CMP(lo1->emile.dpi, lo2->emile.dpi)) && (EINA_DBL_EQ(lo1->emile.dpi, lo2->emile.dpi))
&& (lo1->emile.w == lo2->emile.w) && (lo1->emile.w == lo2->emile.w)
&& (lo1->emile.h == lo2->emile.h) && (lo1->emile.h == lo2->emile.h)
&& (lo1->emile.region.x == lo2->emile.region.x) && (lo1->emile.region.x == lo2->emile.region.x)

View File

@ -84,11 +84,11 @@ evas_triangle3_is_line(Evas_Triangle3 *v)
static inline Eina_Bool static inline Eina_Bool
convex_hull_triangle3_not_first_edje(Evas_Triangle3 *v, Eina_Vector3 *a, Eina_Vector3 *b) convex_hull_triangle3_not_first_edje(Evas_Triangle3 *v, Eina_Vector3 *a, Eina_Vector3 *b)
{ {
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)) && 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)) &&
(EINA_DBL_CMP(v->p2.x, b->x) && EINA_DBL_CMP(v->p2.y, b->y) && EINA_DBL_CMP(v->p2.z, b->z))) (EINA_DBL_EQ(v->p2.x, b->x) && EINA_DBL_EQ(v->p2.y, b->y) && EINA_DBL_EQ(v->p2.z, b->z)))
return EINA_TRUE; return EINA_TRUE;
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)) && 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)) &&
(EINA_DBL_CMP(v->p1.x, b->x) && EINA_DBL_CMP(v->p1.y, b->y) && EINA_DBL_CMP(v->p1.z, b->z))) (EINA_DBL_EQ(v->p1.x, b->x) && EINA_DBL_EQ(v->p1.y, b->y) && EINA_DBL_EQ(v->p1.z, b->z)))
return EINA_TRUE; return EINA_TRUE;
return EINA_FALSE; return EINA_FALSE;
@ -97,13 +97,13 @@ convex_hull_triangle3_not_first_edje(Evas_Triangle3 *v, Eina_Vector3 *a, Eina_Ve
static inline Eina_Bool static inline Eina_Bool
convex_hull_triangle3_first_edje(Evas_Triangle3 *v, Eina_Vector3 *a, Eina_Vector3 *b) convex_hull_triangle3_first_edje(Evas_Triangle3 *v, Eina_Vector3 *a, Eina_Vector3 *b)
{ {
if ((!EINA_FLT_CMP(v->p0.x, a->x) && !EINA_FLT_CMP(v->p0.y, a->y) && if ((!EINA_FLT_EQ(v->p0.x, a->x) && !EINA_FLT_EQ(v->p0.y, a->y) &&
!EINA_FLT_CMP(v->p0.z, a->z)) && (!EINA_FLT_CMP(v->p1.x, b->x) && !EINA_FLT_EQ(v->p0.z, a->z)) && (!EINA_FLT_EQ(v->p1.x, b->x) &&
!EINA_FLT_CMP(v->p1.y, b->y) && !EINA_FLT_CMP(v->p1.z, b->z))) !EINA_FLT_EQ(v->p1.y, b->y) && !EINA_FLT_EQ(v->p1.z, b->z)))
return EINA_TRUE; return EINA_TRUE;
else if ((!EINA_FLT_CMP(v->p1.x, a->x) && !EINA_FLT_CMP(v->p1.y, a->y) && else if ((!EINA_FLT_EQ(v->p1.x, a->x) && !EINA_FLT_EQ(v->p1.y, a->y) &&
!EINA_FLT_CMP(v->p1.z, a->z)) && (!EINA_FLT_CMP(v->p0.x, b->x) && !EINA_FLT_EQ(v->p1.z, a->z)) && (!EINA_FLT_EQ(v->p0.x, b->x) &&
!EINA_FLT_CMP(v->p0.y, b->y) && !EINA_FLT_CMP(v->p0.z, b->z))) !EINA_FLT_EQ(v->p0.y, b->y) && !EINA_FLT_EQ(v->p0.z, b->z)))
return EINA_TRUE; return EINA_TRUE;
return EINA_FALSE; return EINA_FALSE;
@ -112,16 +112,16 @@ convex_hull_triangle3_first_edje(Evas_Triangle3 *v, Eina_Vector3 *a, Eina_Vector
static inline Eina_Bool static inline Eina_Bool
convex_hull_triangle3_first_point(Evas_Triangle3 *v, Eina_Vector3 *a) convex_hull_triangle3_first_point(Evas_Triangle3 *v, Eina_Vector3 *a)
{ {
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)); 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));
} }
static inline Eina_Bool static inline Eina_Bool
eina_vector3_equivalent_as_triangle(Eina_Vector3 *v0, Eina_Vector3 *v1, Eina_Vector3 *v2, eina_vector3_equivalent_as_triangle(Eina_Vector3 *v0, Eina_Vector3 *v1, Eina_Vector3 *v2,
Eina_Vector3 *w0, Eina_Vector3 *w1, Eina_Vector3 *w2) Eina_Vector3 *w0, Eina_Vector3 *w1, Eina_Vector3 *w2)
{ {
if ((EINA_DBL_CMP(v0->x, w0->x) && EINA_DBL_CMP(v0->y, w0->y) && EINA_DBL_CMP(v0->z, w0->z)) && if ((EINA_DBL_EQ(v0->x, w0->x) && EINA_DBL_EQ(v0->y, w0->y) && EINA_DBL_EQ(v0->z, w0->z)) &&
(EINA_DBL_CMP(v1->x, w1->x) && EINA_DBL_CMP(v1->y, w1->y) && EINA_DBL_CMP(v1->z, w1->z)) && (EINA_DBL_EQ(v1->x, w1->x) && EINA_DBL_EQ(v1->y, w1->y) && EINA_DBL_EQ(v1->z, w1->z)) &&
(EINA_DBL_CMP(v2->x, w2->x) && EINA_DBL_CMP(v2->y, w2->y) && EINA_DBL_CMP(v2->z, w2->z))) (EINA_DBL_EQ(v2->x, w2->x) && EINA_DBL_EQ(v2->y, w2->y) && EINA_DBL_EQ(v2->z, w2->z)))
return EINA_TRUE; return EINA_TRUE;
return EINA_FALSE; return EINA_FALSE;
@ -437,7 +437,7 @@ evas_box2_intersect_2d(const Evas_Box2 *box, const Eina_Vector2 *org, const Eina
return EINA_TRUE; return EINA_TRUE;
} }
/* minmax algorithm of ray and box intersection */ /* minmax algorithm of ray and box intersection */
if (!EINA_DBL_CMP(dir->x, 0.0) && !EINA_DBL_CMP(dir->y, 0.0)) if (!EINA_DBL_EQ(dir->x, 0.0) && !EINA_DBL_EQ(dir->y, 0.0))
{ {
t1 = (box->p0.x - org->x) / dir->x; t1 = (box->p0.x - org->x) / dir->x;
t2 = (box->p1.x - org->x) / dir->x; 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
return EINA_FALSE; return EINA_FALSE;
} }
/* case when ray is parallel to one of axes */ /* case when ray is parallel to one of axes */
else if (EINA_DBL_CMP(dir->x, 0.0)) else if (EINA_DBL_EQ(dir->x, 0.0))
{ {
if ((org->x < box->p0.x) && (org->x > box->p1.x)) if ((org->x < box->p0.x) && (org->x > box->p1.x))
return EINA_FALSE; return EINA_FALSE;
@ -511,7 +511,7 @@ evas_box3_ray3_intersect(const Evas_Box3 *box, const Evas_Ray3 *ray)
return EINA_TRUE; return EINA_TRUE;
} }
/* minmax algorithm of ray and box intersection */ /* minmax algorithm of ray and box intersection */
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)) 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))
{ {
t1 = (box->p0.x - ray->org.x) / ray->dir.x; t1 = (box->p0.x - ray->org.x) / ray->dir.x;
t2 = (box->p1.x - ray->org.x) / ray->dir.x; 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)
else else
{ {
/* use two-dimensional version here */ /* use two-dimensional version here */
if (EINA_DBL_CMP(ray->dir.x, 0.0)) if (EINA_DBL_EQ(ray->dir.x, 0.0))
{ {
if ((ray->org.x < box->p0.x) || (ray->org.x > box->p1.x)) if ((ray->org.x < box->p0.x) || (ray->org.x > box->p1.x))
return EINA_FALSE; return EINA_FALSE;
@ -580,7 +580,7 @@ evas_box3_ray3_intersect(const Evas_Box3 *box, const Evas_Ray3 *ray)
} }
} }
if (EINA_DBL_CMP(ray->dir.y, 0.0)) if (EINA_DBL_EQ(ray->dir.y, 0.0))
{ {
if ((ray->org.y < box->p0.y) || (ray->org.y > box->p1.y)) if ((ray->org.y < box->p0.y) || (ray->org.y > box->p1.y))
return EINA_FALSE; return EINA_FALSE;
@ -593,7 +593,7 @@ evas_box3_ray3_intersect(const Evas_Box3 *box, const Evas_Ray3 *ray)
} }
} }
if (EINA_DBL_CMP(ray->dir.z, 0.0)) if (EINA_DBL_EQ(ray->dir.z, 0.0))
{ {
if (ray->org.z < box->p0.z || ray->org.z > box->p1.z) if (ray->org.z < box->p0.z || ray->org.z > box->p1.z)
return EINA_FALSE; return EINA_FALSE;
@ -672,11 +672,11 @@ evas_intersection_line_of_two_plains(Evas_Line3 *line, Eina_Quaternion *plane1,
line->point.y = (plane2->w * plane1->z - plane1->w * plane2->z) / line->direction.x; \ line->point.y = (plane2->w * plane1->z - plane1->w * plane2->z) / line->direction.x; \
line->point.z = (plane2->y * plane1->w - plane1->y * plane2->w) / line->direction.x; line->point.z = (plane2->y * plane1->w - plane1->y * plane2->w) / line->direction.x;
if (!EINA_DBL_CMP(line->direction.x, 0.0) && !EINA_DBL_CMP(plane1->z, 0.0)) if (!EINA_DBL_EQ(line->direction.x, 0.0) && !EINA_DBL_EQ(plane1->z, 0.0))
{ {
SOLVE_EQUATION(x, y, z) SOLVE_EQUATION(x, y, z)
} }
else if (!EINA_DBL_CMP(line->direction.y, 0.0) && !EINA_DBL_CMP(plane1->x, 0.0)) else if (!EINA_DBL_EQ(line->direction.y, 0.0) && !EINA_DBL_EQ(plane1->x, 0.0))
{ {
SOLVE_EQUATION(y, z, x) SOLVE_EQUATION(y, z, x)
} }
@ -895,7 +895,7 @@ tangent_new_basis(Eina_Vector3 *out, Evas_Triangle3 *triangle,
/* calculation of new basis(in system coordinates of texturing) by solution of system of equations */ /* calculation of new basis(in system coordinates of texturing) by solution of system of equations */
if (!EINA_DBL_CMP(new2.y, 0.0)) if (!EINA_DBL_EQ(new2.y, 0.0))
{ {
eina_vector3_scale(&old2, &old2, (new1.y / new2.y)); eina_vector3_scale(&old2, &old2, (new1.y / new2.y));
eina_vector2_scale(&new2, &new2, (new1.y / new2.y)); eina_vector2_scale(&new2, &new2, (new1.y / new2.y));
@ -906,7 +906,7 @@ tangent_new_basis(Eina_Vector3 *out, Evas_Triangle3 *triangle,
eina_vector3_scale(out, &old1, 1 / new1.x); eina_vector3_scale(out, &old1, 1 / new1.x);
} }
else if (!EINA_DBL_CMP(new1.y, 0.0)) else if (!EINA_DBL_EQ(new1.y, 0.0))
{ {
eina_vector3_scale(&old1, &old1, (new2.y / new1.y)); eina_vector3_scale(&old1, &old1, (new2.y / new1.y));
eina_vector2_scale(&new1, &new1, (new2.y / new1.y)); eina_vector2_scale(&new1, &new1, (new2.y / new1.y));
@ -977,8 +977,8 @@ convex_hull_first_tr_get(float *data, int count, int stride)
for (i = 1, j = stride; i < count; i++, j += stride) for (i = 1, j = stride; i < count; i++, j += stride)
{ {
if ((triangle1.z > data[j + 2]) || if ((triangle1.z > data[j + 2]) ||
((EINA_FLT_CMP(triangle1.z, data[j + 2])) && (triangle1.y > data[j + 1])) || ((EINA_FLT_EQ(triangle1.z, data[j + 2])) && (triangle1.y > data[j + 1])) ||
((EINA_FLT_CMP(triangle1.z, data[j + 2])) && (EINA_FLT_CMP(triangle1.y, data[j + 1])) && (triangle1.x > data[j]))) ((EINA_FLT_EQ(triangle1.z, data[j + 2])) && (EINA_FLT_EQ(triangle1.y, data[j + 1])) && (triangle1.x > data[j])))
{ {
eina_vector3_set(&triangle1, data[j], data[j + 1], data[j + 2]); eina_vector3_set(&triangle1, data[j], data[j + 1], data[j + 2]);
first_num = i; first_num = i;
@ -1000,7 +1000,7 @@ convex_hull_first_tr_get(float *data, int count, int stride)
cos_2d = new_cos_2d; \ cos_2d = new_cos_2d; \
eina_vector3_set(&triangle, data[j], data[j + 1], data[j + 2]); \ eina_vector3_set(&triangle, data[j], data[j + 1], data[j + 2]); \
} \ } \
else if(!EINA_FLT_CMP(little, big) && \ else if(!EINA_FLT_EQ(little, big) && \
(eina_vector3_distance_get(&triangle##_candidate, &previous) > \ (eina_vector3_distance_get(&triangle##_candidate, &previous) > \
eina_vector3_distance_get(&triangle, &previous))) \ eina_vector3_distance_get(&triangle, &previous))) \
{ \ { \
@ -1009,9 +1009,9 @@ convex_hull_first_tr_get(float *data, int count, int stride)
eina_vector3_set(&complanar1, 1, 0, 0); eina_vector3_set(&complanar1, 1, 0, 0);
for (i = 0, j = 0; i < count; i++, j += stride) for (i = 0, j = 0; i < count; i++, j += stride)
{ {
if (EINA_FLT_CMP(data[j], triangle1.x) || if (EINA_FLT_EQ(data[j], triangle1.x) ||
EINA_FLT_CMP(data[j + 1], triangle1.y) || EINA_FLT_EQ(data[j + 1], triangle1.y) ||
EINA_FLT_CMP(data[j + 2], triangle1.z)) EINA_FLT_EQ(data[j + 2], triangle1.z))
{ {
eina_vector3_set(&triangle2_candidate, data[j], data[j + 1], data[j + 2]); eina_vector3_set(&triangle2_candidate, data[j], data[j + 1], data[j + 2]);
eina_vector3_subtract(&diagonal, &triangle2_candidate, &triangle1); eina_vector3_subtract(&diagonal, &triangle2_candidate, &triangle1);
@ -1024,7 +1024,7 @@ convex_hull_first_tr_get(float *data, int count, int stride)
eina_vector3_subtract(&diagonal, &triangle2, &triangle1); eina_vector3_subtract(&diagonal, &triangle2, &triangle1);
cos_2d = eina_vector3_angle_get(&complanar1, &diagonal); cos_2d = eina_vector3_angle_get(&complanar1, &diagonal);
} }
else if (!EINA_FLT_CMP(sin, new_sin)) else if (!EINA_FLT_EQ(sin, new_sin))
{ {
eina_vector3_subtract(&diagonal, &triangle2_candidate, &triangle1); eina_vector3_subtract(&diagonal, &triangle2_candidate, &triangle1);
new_cos_2d = eina_vector3_angle_get(&complanar1, &diagonal); new_cos_2d = eina_vector3_angle_get(&complanar1, &diagonal);
@ -1050,12 +1050,12 @@ convex_hull_first_tr_get(float *data, int count, int stride)
{ {
eina_vector3_set(&candidate, data[j], data[j + 1], data[j + 2]); eina_vector3_set(&candidate, data[j], data[j + 1], data[j + 2]);
if ((EINA_FLT_CMP(data[j], triangle1.x) || if ((EINA_FLT_EQ(data[j], triangle1.x) ||
EINA_FLT_CMP(data[j + 1], triangle1.y) || EINA_FLT_EQ(data[j + 1], triangle1.y) ||
EINA_FLT_CMP(data[j + 2], triangle1.z)) && EINA_FLT_EQ(data[j + 2], triangle1.z)) &&
(EINA_FLT_CMP(data[j], triangle2.x) || (EINA_FLT_EQ(data[j], triangle2.x) ||
EINA_FLT_CMP(data[j + 1], triangle2.y) || EINA_FLT_EQ(data[j + 1], triangle2.y) ||
EINA_FLT_CMP(data[j + 2], triangle2.z))) EINA_FLT_EQ(data[j + 2], triangle2.z)))
{ {
eina_vector3_plane_by_points(&normal_b, &triangle1, &candidate, &triangle2); eina_vector3_plane_by_points(&normal_b, &triangle1, &candidate, &triangle2);
@ -1073,7 +1073,7 @@ convex_hull_first_tr_get(float *data, int count, int stride)
eina_vector3_set(&triangle3, data[j], data[j + 1], data[j + 2]); eina_vector3_set(&triangle3, data[j], data[j + 1], data[j + 2]);
cos_2d = eina_vector3_angle_get(&diagonal, &first); cos_2d = eina_vector3_angle_get(&diagonal, &first);
} }
else if (!EINA_FLT_CMP(new_cos, cos)) else if (!EINA_FLT_EQ(new_cos, cos))
{ {
eina_vector3_set(&triangle3_candidate, data[j], data[j + 1], data[j + 2]); eina_vector3_set(&triangle3_candidate, data[j], data[j + 1], data[j + 2]);
eina_vector3_subtract(&first, &triangle1, &triangle2); eina_vector3_subtract(&first, &triangle1, &triangle2);
@ -1156,11 +1156,11 @@ evas_convex_hull_get(float *data, int count, int stride, Eina_Inarray *vertex,
and one new vertex, all vertices should be checked */ and one new vertex, all vertices should be checked */
for (i = 0, j = 0; i < count; i++, j += stride) for (i = 0, j = 0; i < count; i++, j += stride)
{ {
if ((EINA_FLT_CMP(elem->p0.x, data[j]) || EINA_FLT_CMP(elem->p0.y, data[j + 1]) || if ((EINA_FLT_EQ(elem->p0.x, data[j]) || EINA_FLT_EQ(elem->p0.y, data[j + 1]) ||
EINA_FLT_CMP(elem->p0.z, data[j + 2])) && (EINA_FLT_CMP(elem->p1.x, data[j]) || EINA_FLT_EQ(elem->p0.z, data[j + 2])) && (EINA_FLT_EQ(elem->p1.x, data[j]) ||
EINA_FLT_CMP(elem->p1.y, data[j + 1]) || EINA_FLT_CMP(elem->p1.z, data[j + 2])) && EINA_FLT_EQ(elem->p1.y, data[j + 1]) || EINA_FLT_EQ(elem->p1.z, data[j + 2])) &&
(EINA_FLT_CMP(elem->p2.x, data[j]) || EINA_FLT_CMP(elem->p2.y, data[j + 1]) || (EINA_FLT_EQ(elem->p2.x, data[j]) || EINA_FLT_EQ(elem->p2.y, data[j + 1]) ||
EINA_FLT_CMP(elem->p2.z, data[j + 2]))) EINA_FLT_EQ(elem->p2.z, data[j + 2])))
{ {
next = malloc(sizeof(Eina_Vector3)); next = malloc(sizeof(Eina_Vector3));
eina_vector3_set(next, data[j], data[j + 1], data[j + 2]); 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,
/* The case when several points are found, is discussed below. /* The case when several points are found, is discussed below.
This case is interesting because the convex hull in the This case is interesting because the convex hull in the
two-dimensional subspace should be filled further */ two-dimensional subspace should be filled further */
if ((!EINA_FLT_CMP(cos, 1.0)) && (1 < eina_array_count(&arr_candidates))) if ((!EINA_FLT_EQ(cos, 1.0)) && (1 < eina_array_count(&arr_candidates)))
{ {
Eina_Vector3 angle_from, angle_to; Eina_Vector3 angle_from, angle_to;
next_2d = eina_array_data_get(&arr_candidates, 0); 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,
cos_2d = new_cos; cos_2d = new_cos;
best = eina_array_data_get(&arr_candidates, k); best = eina_array_data_get(&arr_candidates, k);
} }
else if (!EINA_FLT_CMP(new_cos, cos_2d)) else if (!EINA_FLT_EQ(new_cos, cos_2d))
{ {
if ((right && (eina_vector3_distance_get(best, &elem->p0) < eina_vector3_length_get(&angle_from))) || if ((right && (eina_vector3_distance_get(best, &elem->p0) < eina_vector3_length_get(&angle_from))) ||
(!right && (eina_vector3_distance_get(best, &elem->p1) < eina_vector3_length_get(&angle_from)))) (!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,
/* This event will take place after the previous, /* This event will take place after the previous,
in fact, choice of first triangle in a new two-dimensional in fact, choice of first triangle in a new two-dimensional
convex hull allows to fill it fan counterclockwise when viewed from the inside */ convex hull allows to fill it fan counterclockwise when viewed from the inside */
else if ((EINA_FLT_CMP(cos, 1.0)) && (1 < eina_array_count(&arr_candidates))) else if ((EINA_FLT_EQ(cos, 1.0)) && (1 < eina_array_count(&arr_candidates)))
{ {
Eina_Vector3 angle_from, angle_to; Eina_Vector3 angle_from, angle_to;
eina_vector3_subtract(&angle_from, &elem->p0, &elem->p1); 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,
cos_2d = new_cos; cos_2d = new_cos;
best = eina_array_data_get(&arr_candidates, k); best = eina_array_data_get(&arr_candidates, k);
} }
else if (!EINA_FLT_CMP(new_cos, cos_2d)) else if (!EINA_FLT_EQ(new_cos, cos_2d))
{ {
if (eina_vector3_distance_get(best, &elem->p0) < eina_vector3_length_get(&angle_to)) if (eina_vector3_distance_get(best, &elem->p0) < eina_vector3_length_get(&angle_to))
best = eina_array_data_get(&arr_candidates, k); 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,
exist1 = EINA_FALSE; \ exist1 = EINA_FALSE; \
for (i = 0, new_stride = 0; (i < vertex_count) && !exist1; i++, new_stride += 10) \ for (i = 0, new_stride = 0; (i < vertex_count) && !exist1; i++, new_stride += 10) \
{ \ { \
if ((k > 0) && !EINA_FLT_CMP(el->p##coord.x, found_vertex[new_stride]) && \ if ((k > 0) && !EINA_FLT_EQ(el->p##coord.x, found_vertex[new_stride]) && \
!EINA_FLT_CMP(el->p##coord.y, found_vertex[new_stride + 1]) && \ !EINA_FLT_EQ(el->p##coord.y, found_vertex[new_stride + 1]) && \
!EINA_FLT_CMP(el->p##coord.z, found_vertex[new_stride + 2])) \ !EINA_FLT_EQ(el->p##coord.z, found_vertex[new_stride + 2])) \
{ \ { \
exist1 = EINA_TRUE; \ exist1 = EINA_TRUE; \
found_index[3 * k + coord] = i; \ found_index[3 * k + coord] = i; \
@ -1536,10 +1536,10 @@ evas_tangent_space_get(float *data, float *tex_data, float *normal_data, unsigne
if ((fabs(data[j] - data[m]) < FLT_EPSILON) && if ((fabs(data[j] - data[m]) < FLT_EPSILON) &&
(fabs(data[j + 1] - data[m + 1]) < FLT_EPSILON) && (fabs(data[j + 1] - data[m + 1]) < FLT_EPSILON) &&
(fabs(data[j + 2] - data[m + 2]) < FLT_EPSILON) && (fabs(data[j + 2] - data[m + 2]) < FLT_EPSILON) &&
((m == j) || ((!EINA_FLT_CMP(tex_data[i * tex_stride], 0.0)) && ((m == j) || ((!EINA_FLT_EQ(tex_data[i * tex_stride], 0.0)) &&
!EINA_FLT_CMP(tex_data[i * tex_stride + 1], 0.0) && !EINA_FLT_EQ(tex_data[i * tex_stride + 1], 0.0) &&
!EINA_FLT_CMP(tex_data[i * tex_stride], 1.0) && !EINA_FLT_EQ(tex_data[i * tex_stride], 1.0) &&
!EINA_FLT_CMP(tex_data[i * tex_stride + 1], 1.0)))) !EINA_FLT_EQ(tex_data[i * tex_stride + 1], 1.0))))
{ {
found_index = l; found_index = l;
for (k = 0; k < index_count; k += 3) for (k = 0; k < index_count; k += 3)

View File

@ -549,7 +549,7 @@ _drm_transparent_set(Ecore_Evas *ee, int transparent)
static void static void
_drm_aspect_set(Ecore_Evas *ee, double aspect) _drm_aspect_set(Ecore_Evas *ee, double aspect)
{ {
if (EINA_FLT_CMP(ee->prop.aspect, aspect)) return; if (EINA_FLT_EQ(ee->prop.aspect, aspect)) return;
ee->prop.aspect = aspect; ee->prop.aspect = aspect;
} }

View File

@ -939,7 +939,7 @@ _ecore_evas_wl_common_resize(Ecore_Evas *ee, int w, int h)
if (bh < 1) bh = 1; if (bh < 1) bh = 1;
a = ((double)bw / (double)bh); a = ((double)bw / (double)bh);
if ((!EINA_FLT_CMP(ee->prop.aspect, 0.0) && if ((!EINA_FLT_EQ(ee->prop.aspect, 0.0) &&
(a < ee->prop.aspect))) (a < ee->prop.aspect)))
{ {
if ((h < ee->h) > 0) if ((h < ee->h) > 0)
@ -950,7 +950,7 @@ _ecore_evas_wl_common_resize(Ecore_Evas *ee, int w, int h)
w = bw + ee->prop.base.w; w = bw + ee->prop.base.w;
h = bh + ee->prop.base.h; h = bh + ee->prop.base.h;
} }
else if ((!EINA_FLT_CMP(ee->prop.aspect, 0.0)) && else if ((!EINA_FLT_EQ(ee->prop.aspect, 0.0)) &&
(a > ee->prop.aspect)) (a > ee->prop.aspect))
{ {
bw = bh * ee->prop.aspect; bw = bh * ee->prop.aspect;
@ -960,7 +960,7 @@ _ecore_evas_wl_common_resize(Ecore_Evas *ee, int w, int h)
else else
{ {
a = ((double)w / (double)h); a = ((double)w / (double)h);
if ((!EINA_FLT_CMP(ee->prop.aspect, 0.0)) && if ((!EINA_FLT_EQ(ee->prop.aspect, 0.0)) &&
(a < ee->prop.aspect)) (a < ee->prop.aspect))
{ {
if ((h < ee->h) > 0) if ((h < ee->h) > 0)
@ -968,7 +968,7 @@ _ecore_evas_wl_common_resize(Ecore_Evas *ee, int w, int h)
else else
h = w / ee->prop.aspect; h = w / ee->prop.aspect;
} }
else if ((!EINA_FLT_CMP(ee->prop.aspect, 0.0)) && else if ((!EINA_FLT_EQ(ee->prop.aspect, 0.0)) &&
(a > ee->prop.aspect)) (a > ee->prop.aspect))
w = h * ee->prop.aspect; w = h * ee->prop.aspect;
} }
@ -1272,7 +1272,7 @@ _ecore_evas_wl_common_aspect_set(Ecore_Evas *ee, double aspect)
LOGFN(__FILE__, __LINE__, __FUNCTION__); LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (!ee) return; if (!ee) return;
if (EINA_FLT_CMP(ee->prop.aspect, aspect)) return; if (EINA_FLT_EQ(ee->prop.aspect, aspect)) return;
ee->prop.aspect = aspect; ee->prop.aspect = aspect;
} }

View File

@ -2968,7 +2968,7 @@ _ecore_evas_x_window_group_set(Ecore_Evas *ee, const Ecore_Evas *group_ee)
static void static void
_ecore_evas_x_aspect_set(Ecore_Evas *ee, double aspect) _ecore_evas_x_aspect_set(Ecore_Evas *ee, double aspect)
{ {
if (EINA_FLT_CMP(ee->prop.aspect, aspect)) return; if (EINA_FLT_EQ(ee->prop.aspect, aspect)) return;
ee->prop.aspect = aspect; ee->prop.aspect = aspect;
_ecore_evas_x_size_pos_hints_update(ee); _ecore_evas_x_size_pos_hints_update(ee);

View File

@ -345,7 +345,7 @@ _update_emotion_fps(EmotionVideoSinkPrivate *priv)
tim = ecore_time_get(); tim = ecore_time_get();
priv->frames++; priv->frames++;
if (EINA_DBL_CMP(priv->rlapse, 0.0)) if (EINA_DBL_EQ(priv->rlapse, 0.0))
{ {
priv->rlapse = tim; priv->rlapse = tim;
priv->flapse = priv->frames; priv->flapse = priv->frames;

View File

@ -196,7 +196,7 @@ _em_slave(void *par)
pos = *((double *)eev->xine_event); pos = *((double *)eev->xine_event);
if ((xine_get_param(ev->stream, XINE_PARAM_SPEED) == XINE_SPEED_PAUSE) && if ((xine_get_param(ev->stream, XINE_PARAM_SPEED) == XINE_SPEED_PAUSE) &&
(EINA_DBL_CMP(pos, ev->pos)) && (EINA_DBL_EQ(pos, ev->pos)) &&
(!ev->just_loaded)) (!ev->just_loaded))
{ {
xine_set_param(ev->stream, XINE_PARAM_SPEED, XINE_SPEED_NORMAL); xine_set_param(ev->stream, XINE_PARAM_SPEED, XINE_SPEED_NORMAL);
@ -1324,7 +1324,7 @@ _em_fd_ev_active(void *data EINA_UNUSED, Ecore_Fd_Handler *fdh)
ev->play_ok = 1; ev->play_ok = 1;
break; break;
case 15: /* get pos done */ case 15: /* get pos done */
if (!EINA_DBL_CMP(ev->last_pos, ev->pos)) if (!EINA_DBL_EQ(ev->last_pos, ev->pos))
{ {
ev->last_pos = ev->pos; ev->last_pos = ev->pos;
_emotion_video_pos_update(ev->obj, ev->pos, ev->len); _emotion_video_pos_update(ev->obj, ev->pos, ev->len);

View File

@ -30,9 +30,9 @@ normal_vector(float x1, float y1, float x2, float y2, float width,
float dx = x2 - x1; float dx = x2 - x1;
float dy = y2 - y1; float dy = y2 - y1;
if (EINA_FLT_CMP(dx, 0)) if (EINA_FLT_EQ(dx, 0))
pw = width / fabsf(dy); pw = width / fabsf(dy);
else if (EINA_FLT_CMP(dy, 0)) else if (EINA_FLT_EQ(dy, 0))
pw = width / fabsf(dx); pw = width / fabsf(dx);
else else
pw = width / sqrtf(dx*dx + dy*dy); pw = width / sqrtf(dx*dx + dy*dy);
@ -396,7 +396,7 @@ static inline void
_skip_duplicate_points(const double **pts, const double *end_pts) _skip_duplicate_points(const double **pts, const double *end_pts)
{ {
while ((*pts + 2) < end_pts && (*pts)[0] == (*pts)[2] && while ((*pts + 2) < end_pts && (*pts)[0] == (*pts)[2] &&
EINA_FLT_CMP((*pts)[1], (*pts)[3])) EINA_FLT_EQ((*pts)[1], (*pts)[3]))
{ {
*pts += 2; *pts += 2;
} }
@ -424,7 +424,7 @@ _path_info_get(const Efl_Gfx_Path_Command *cmds, const double *pts, Eina_Bool *i
*implicit_close = EINA_TRUE; *implicit_close = EINA_TRUE;
// fall through // fall through
case EFL_GFX_PATH_COMMAND_TYPE_MOVE_TO: case EFL_GFX_PATH_COMMAND_TYPE_MOVE_TO:
if (EINA_FLT_CMP(pts[0], pts[i]) && EINA_FLT_CMP(pts[1], pts[i+1])) if (EINA_FLT_EQ(pts[0], pts[i]) && EINA_FLT_EQ(pts[1], pts[i+1]))
*ends_at_start = EINA_TRUE; *ends_at_start = EINA_TRUE;
return; return;
default: default:
@ -432,8 +432,8 @@ _path_info_get(const Efl_Gfx_Path_Command *cmds, const double *pts, Eina_Bool *i
} }
} }
// this path is the last path with out implicit close. // this path is the last path with out implicit close.
*ends_at_start = EINA_FLT_CMP(pts[0], pts[i]) && *ends_at_start = EINA_FLT_EQ(pts[0], pts[i]) &&
EINA_FLT_CMP(pts[1], pts[i+1]); EINA_FLT_EQ(pts[1], pts[i+1]);
} }
void void
@ -492,7 +492,7 @@ triangulator_stroker_process(Triangulator_Stroker *stroker,
break; break;
} }
case EFL_GFX_PATH_COMMAND_TYPE_LINE_TO: case EFL_GFX_PATH_COMMAND_TYPE_LINE_TO:
if (!EINA_FLT_CMP(stroker->cx, pts[0]) || !EINA_FLT_CMP(stroker->cy, (float)pts[1])) if (!EINA_FLT_EQ(stroker->cx, pts[0]) || !EINA_FLT_EQ(stroker->cy, (float)pts[1]))
{ {
if (previous_type != EFL_GFX_PATH_COMMAND_TYPE_MOVE_TO) if (previous_type != EFL_GFX_PATH_COMMAND_TYPE_MOVE_TO)
add_join(stroker, pts[0], pts[1]); add_join(stroker, pts[0], pts[1]);
@ -502,15 +502,15 @@ triangulator_stroker_process(Triangulator_Stroker *stroker,
pts+=2; pts+=2;
break; break;
case EFL_GFX_PATH_COMMAND_TYPE_CUBIC_TO: case EFL_GFX_PATH_COMMAND_TYPE_CUBIC_TO:
if (!EINA_FLT_CMP(stroker->cx, pts[0]) || if (!EINA_FLT_EQ(stroker->cx, pts[0]) ||
!EINA_FLT_CMP(stroker->cy, pts[1]) || !EINA_FLT_EQ(stroker->cy, pts[1]) ||
!EINA_FLT_CMP(pts[0], pts[2]) || !EINA_FLT_EQ(pts[0], pts[2]) ||
!EINA_FLT_CMP(pts[1], pts[3]) || !EINA_FLT_EQ(pts[1], pts[3]) ||
!EINA_FLT_CMP(pts[2], pts[4]) || !EINA_FLT_EQ(pts[2], pts[4]) ||
!EINA_FLT_CMP(pts[3], pts[5])) !EINA_FLT_EQ(pts[3], pts[5]))
{ {
if (!EINA_FLT_CMP(stroker->cx, pts[0]) || if (!EINA_FLT_EQ(stroker->cx, pts[0]) ||
!EINA_FLT_CMP(stroker->cy, pts[1])) !EINA_FLT_EQ(stroker->cy, pts[1]))
{ {
if (previous_type != EFL_GFX_PATH_COMMAND_TYPE_MOVE_TO) if (previous_type != EFL_GFX_PATH_COMMAND_TYPE_MOVE_TO)
add_join(stroker, pts[0], pts[1]); add_join(stroker, pts[0], pts[1]);

View File

@ -49,10 +49,10 @@ START_TEST(eina_matrix2)
&xx, &xy, &xx, &xy,
&yx, &yy); &yx, &yy);
fail_if(!EINA_DBL_CMP(xx, yy) || fail_if(!EINA_DBL_EQ(xx, yy) ||
!EINA_DBL_CMP(yy, 1)); !EINA_DBL_EQ(yy, 1));
fail_if(!EINA_DBL_CMP(xy, yx) || fail_if(!EINA_DBL_EQ(xy, yx) ||
!EINA_DBL_CMP(xy, 0)); !EINA_DBL_EQ(xy, 0));
eina_shutdown(); eina_shutdown();
} }
@ -78,26 +78,26 @@ START_TEST(eina_matrix2_operation)
eina_matrix2_values_get(&m1, eina_matrix2_values_get(&m1,
&xx, &xy, &xx, &xy,
&yx, &yy); &yx, &yy);
fail_if(!EINA_DBL_CMP(xx, yy) || fail_if(!EINA_DBL_EQ(xx, yy) ||
!EINA_DBL_CMP(yy, 1)); !EINA_DBL_EQ(yy, 1));
fail_if(!EINA_DBL_CMP(xy, yx) || fail_if(!EINA_DBL_EQ(xy, yx) ||
!EINA_DBL_CMP(xy, 0)); !EINA_DBL_EQ(xy, 0));
eina_matrix2_array_set(&m1, arr); eina_matrix2_array_set(&m1, arr);
eina_matrix2_values_get(&m1, eina_matrix2_values_get(&m1,
&xx, &xy, &xx, &xy,
&yx, &yy); &yx, &yy);
fail_if(!EINA_DBL_CMP(xx, yy) || fail_if(!EINA_DBL_EQ(xx, yy) ||
!EINA_DBL_CMP(yx, xy) || !EINA_DBL_EQ(yx, xy) ||
!EINA_DBL_CMP(xy, 1)); !EINA_DBL_EQ(xy, 1));
eina_matrix2_copy(&m2, &m1); eina_matrix2_copy(&m2, &m1);
eina_matrix2_values_get(&m2, eina_matrix2_values_get(&m2,
&xx, &xy, &xx, &xy,
&yx, &yy); &yx, &yy);
fail_if(!EINA_DBL_CMP(xx, yy) || fail_if(!EINA_DBL_EQ(xx, yy) ||
!EINA_DBL_CMP(yx, xy) || !EINA_DBL_EQ(yx, xy) ||
!EINA_DBL_CMP(xy, 1)); !EINA_DBL_EQ(xy, 1));
eina_matrix2_values_set(&m1, eina_matrix2_values_set(&m1,
2, 3, 2, 3,
@ -106,17 +106,17 @@ START_TEST(eina_matrix2_operation)
eina_matrix2_values_get(&m3, eina_matrix2_values_get(&m3,
&xx, &xy, &xx, &xy,
&yx, &yy); &yx, &yy);
fail_if(!EINA_DBL_CMP(xx, yy) || fail_if(!EINA_DBL_EQ(xx, yy) ||
!EINA_DBL_CMP(yx, xy) || !EINA_DBL_EQ(yx, xy) ||
!EINA_DBL_CMP(xy, 5)); !EINA_DBL_EQ(xy, 5));
eina_matrix2_multiply(&m3, &m1, &m2); eina_matrix2_multiply(&m3, &m1, &m2);
eina_matrix2_values_get(&m3, eina_matrix2_values_get(&m3,
&xx, &xy, &xx, &xy,
&yx, &yy); &yx, &yy);
fail_if(!EINA_DBL_CMP(xx, yy) || fail_if(!EINA_DBL_EQ(xx, yy) ||
!EINA_DBL_CMP(yx, xy) || !EINA_DBL_EQ(yx, xy) ||
!EINA_DBL_CMP(xy, 5)); !EINA_DBL_EQ(xy, 5));
} }
END_TEST END_TEST
@ -151,22 +151,22 @@ START_TEST(eina_matrix4)
&zx, &zy, &zz, &zw, &zx, &zy, &zz, &zw,
&wx, &wy, &wz, &ww); &wx, &wy, &wz, &ww);
fail_if(!EINA_DBL_CMP(xx, yy) || fail_if(!EINA_DBL_EQ(xx, yy) ||
!EINA_DBL_CMP(yy, zz) || !EINA_DBL_EQ(yy, zz) ||
!EINA_DBL_CMP(zz, ww) || !EINA_DBL_EQ(zz, ww) ||
!EINA_DBL_CMP(ww, 1)); !EINA_DBL_EQ(ww, 1));
fail_if(!EINA_DBL_CMP(xy, xz) || fail_if(!EINA_DBL_EQ(xy, xz) ||
!EINA_DBL_CMP(xz, xw) || !EINA_DBL_EQ(xz, xw) ||
!EINA_DBL_CMP(xw, yx) || !EINA_DBL_EQ(xw, yx) ||
!EINA_DBL_CMP(yx, yz) || !EINA_DBL_EQ(yx, yz) ||
!EINA_DBL_CMP(yz, yw) || !EINA_DBL_EQ(yz, yw) ||
!EINA_DBL_CMP(yw, zx) || !EINA_DBL_EQ(yw, zx) ||
!EINA_DBL_CMP(zx, zy) || !EINA_DBL_EQ(zx, zy) ||
!EINA_DBL_CMP(zy, zw) || !EINA_DBL_EQ(zy, zw) ||
!EINA_DBL_CMP(zw, wx) || !EINA_DBL_EQ(zw, wx) ||
!EINA_DBL_CMP(wx, wy) || !EINA_DBL_EQ(wx, wy) ||
!EINA_DBL_CMP(wy, wz) || !EINA_DBL_EQ(wy, wz) ||
!EINA_DBL_CMP(wz, 0)); !EINA_DBL_EQ(wz, 0));
eina_matrix4_values_set(&m, eina_matrix4_values_set(&m,
1, 2, 3, 4, 1, 2, 3, 4,
@ -175,22 +175,22 @@ START_TEST(eina_matrix4)
13, 14, 15, 16); 13, 14, 15, 16);
eina_matrix4_transpose(&n, &m); eina_matrix4_transpose(&n, &m);
fail_if(!EINA_DBL_CMP(n.xx, 1) || fail_if(!EINA_DBL_EQ(n.xx, 1) ||
!EINA_DBL_CMP(n.xy, 5) || !EINA_DBL_EQ(n.xy, 5) ||
!EINA_DBL_CMP(n.xz, 9) || !EINA_DBL_EQ(n.xz, 9) ||
!EINA_DBL_CMP(n.xw, 13) || !EINA_DBL_EQ(n.xw, 13) ||
!EINA_DBL_CMP(n.yx, 2) || !EINA_DBL_EQ(n.yx, 2) ||
!EINA_DBL_CMP(n.yy, 6) || !EINA_DBL_EQ(n.yy, 6) ||
!EINA_DBL_CMP(n.yz, 10) || !EINA_DBL_EQ(n.yz, 10) ||
!EINA_DBL_CMP(n.yw, 14) || !EINA_DBL_EQ(n.yw, 14) ||
!EINA_DBL_CMP(n.zx, 3) || !EINA_DBL_EQ(n.zx, 3) ||
!EINA_DBL_CMP(n.zy, 7) || !EINA_DBL_EQ(n.zy, 7) ||
!EINA_DBL_CMP(n.zz, 11) || !EINA_DBL_EQ(n.zz, 11) ||
!EINA_DBL_CMP(n.zw, 15) || !EINA_DBL_EQ(n.zw, 15) ||
!EINA_DBL_CMP(n.wx, 4) || !EINA_DBL_EQ(n.wx, 4) ||
!EINA_DBL_CMP(n.wy, 8) || !EINA_DBL_EQ(n.wy, 8) ||
!EINA_DBL_CMP(n.wz, 12) || !EINA_DBL_EQ(n.wz, 12) ||
!EINA_DBL_CMP(n.ww, 16)); !EINA_DBL_EQ(n.ww, 16));
eina_shutdown(); eina_shutdown();
} }
@ -213,7 +213,7 @@ START_TEST(eina_matrix4_operation)
0, 0, 0, 2, 0, 0, 0, 2,
0, 2, 0, 0); 0, 2, 0, 0);
det = eina_matrix4_determinant(&m); det = eina_matrix4_determinant(&m);
fail_if(!EINA_DBL_CMP(det, -16)); fail_if(!EINA_DBL_EQ(det, -16));
eina_matrix4_inverse(&m1, &m); eina_matrix4_inverse(&m1, &m);
eina_matrix4_values_get(&m1, eina_matrix4_values_get(&m1,
@ -221,10 +221,10 @@ START_TEST(eina_matrix4_operation)
&yx, &yy, &yz, &yw, &yx, &yy, &yz, &yw,
&zx, &zy, &zz, &zw, &zx, &zy, &zz, &zw,
&wx, &wy, &wz, &ww); &wx, &wy, &wz, &ww);
fail_if (!EINA_DBL_CMP(xy, 0.5) || fail_if (!EINA_DBL_EQ(xy, 0.5) ||
!EINA_DBL_CMP(yw, xy) || !EINA_DBL_EQ(yw, xy) ||
!EINA_DBL_CMP(zx, yw) || !EINA_DBL_EQ(zx, yw) ||
!EINA_DBL_CMP(wz, zx)); !EINA_DBL_EQ(wz, zx));
eina_matrix4_identity(&m1); eina_matrix4_identity(&m1);
eina_matrix4_values_get(&m1, eina_matrix4_values_get(&m1,
@ -232,10 +232,10 @@ START_TEST(eina_matrix4_operation)
&yx, &yy, &yz, &yw, &yx, &yy, &yz, &yw,
&zx, &zy, &zz, &zw, &zx, &zy, &zz, &zw,
&wx, &wy, &wz, &ww); &wx, &wy, &wz, &ww);
fail_if (!EINA_DBL_CMP(xx, 1) || fail_if (!EINA_DBL_EQ(xx, 1) ||
!EINA_DBL_CMP(yy, xx) || !EINA_DBL_EQ(yy, xx) ||
!EINA_DBL_CMP(zz, yy) || !EINA_DBL_EQ(zz, yy) ||
!EINA_DBL_CMP(ww, zz)); !EINA_DBL_EQ(ww, zz));
eina_matrix4_values_set(&m1, eina_matrix4_values_set(&m1,
0, 2, 2, 0, 0, 2, 2, 0,
@ -248,14 +248,14 @@ START_TEST(eina_matrix4_operation)
&yx, &yy, &yz, &yw, &yx, &yy, &yz, &yw,
&zx, &zy, &zz, &zw, &zx, &zy, &zz, &zw,
&wx, &wy, &wz, &ww); &wx, &wy, &wz, &ww);
fail_if (!EINA_DBL_CMP(xx, 4) || fail_if (!EINA_DBL_EQ(xx, 4) ||
!EINA_DBL_CMP(xw, xx) || !EINA_DBL_EQ(xw, xx) ||
!EINA_DBL_CMP(yy, xw) || !EINA_DBL_EQ(yy, xw) ||
!EINA_DBL_CMP(yz, yy) || !EINA_DBL_EQ(yz, yy) ||
!EINA_DBL_CMP(zy, yz) || !EINA_DBL_EQ(zy, yz) ||
!EINA_DBL_CMP(zz, yy) || !EINA_DBL_EQ(zz, yy) ||
!EINA_DBL_CMP(wx, xx) || !EINA_DBL_EQ(wx, xx) ||
!EINA_DBL_CMP(ww, zy)); !EINA_DBL_EQ(ww, zy));
eina_matrix4_multiply(&m2, &m1, &m); eina_matrix4_multiply(&m2, &m1, &m);
eina_matrix4_values_get(&m2, eina_matrix4_values_get(&m2,
@ -263,14 +263,14 @@ START_TEST(eina_matrix4_operation)
&yx, &yy, &yz, &yw, &yx, &yy, &yz, &yw,
&zx, &zy, &zz, &zw, &zx, &zy, &zz, &zw,
&wx, &wy, &wz, &ww); &wx, &wy, &wz, &ww);
fail_if (!EINA_DBL_CMP(xx, 4) || fail_if (!EINA_DBL_EQ(xx, 4) ||
!EINA_DBL_CMP(xw, xx) || !EINA_DBL_EQ(xw, xx) ||
!EINA_DBL_CMP(yy, xw) || !EINA_DBL_EQ(yy, xw) ||
!EINA_DBL_CMP(yz, yy) || !EINA_DBL_EQ(yz, yy) ||
!EINA_DBL_CMP(zy, yz) || !EINA_DBL_EQ(zy, yz) ||
!EINA_DBL_CMP(zz, yy) || !EINA_DBL_EQ(zz, yy) ||
!EINA_DBL_CMP(wx, xx) || !EINA_DBL_EQ(wx, xx) ||
!EINA_DBL_CMP(ww, zy)); !EINA_DBL_EQ(ww, zy));
eina_matrix4_array_set(&m1, arr); eina_matrix4_array_set(&m1, arr);
eina_matrix4_values_get(&m1, eina_matrix4_values_get(&m1,
@ -278,14 +278,14 @@ START_TEST(eina_matrix4_operation)
&yx, &yy, &yz, &yw, &yx, &yy, &yz, &yw,
&zx, &zy, &zz, &zw, &zx, &zy, &zz, &zw,
&wx, &wy, &wz, &ww); &wx, &wy, &wz, &ww);
fail_if (!EINA_DBL_CMP(xx, 1) || fail_if (!EINA_DBL_EQ(xx, 1) ||
!EINA_DBL_CMP(xw, xx) || !EINA_DBL_EQ(xw, xx) ||
!EINA_DBL_CMP(yy, xw) || !EINA_DBL_EQ(yy, xw) ||
!EINA_DBL_CMP(yz, yy) || !EINA_DBL_EQ(yz, yy) ||
!EINA_DBL_CMP(zy, yz) || !EINA_DBL_EQ(zy, yz) ||
!EINA_DBL_CMP(zz, yy) || !EINA_DBL_EQ(zz, yy) ||
!EINA_DBL_CMP(wx, xx) || !EINA_DBL_EQ(wx, xx) ||
!EINA_DBL_CMP(ww, zy)); !EINA_DBL_EQ(ww, zy));
eina_matrix4_copy(&m, &m1); eina_matrix4_copy(&m, &m1);
eina_matrix4_values_get(&m1, eina_matrix4_values_get(&m1,
@ -293,14 +293,14 @@ START_TEST(eina_matrix4_operation)
&yx, &yy, &yz, &yw, &yx, &yy, &yz, &yw,
&zx, &zy, &zz, &zw, &zx, &zy, &zz, &zw,
&wx, &wy, &wz, &ww); &wx, &wy, &wz, &ww);
fail_if (!EINA_DBL_CMP(xx, 1) || fail_if (!EINA_DBL_EQ(xx, 1) ||
!EINA_DBL_CMP(xw, xx) || !EINA_DBL_EQ(xw, xx) ||
!EINA_DBL_CMP(yy, xw) || !EINA_DBL_EQ(yy, xw) ||
!EINA_DBL_CMP(yz, yy) || !EINA_DBL_EQ(yz, yy) ||
!EINA_DBL_CMP(zy, yz) || !EINA_DBL_EQ(zy, yz) ||
!EINA_DBL_CMP(zz, yy) || !EINA_DBL_EQ(zz, yy) ||
!EINA_DBL_CMP(wx, xx) || !EINA_DBL_EQ(wx, xx) ||
!EINA_DBL_CMP(ww, zy)); !EINA_DBL_EQ(ww, zy));
eina_matrix4_ortho_set(&m, l, r, b, t, dn, df); eina_matrix4_ortho_set(&m, l, r, b, t, dn, df);
eina_matrix4_values_get(&m, eina_matrix4_values_get(&m,
@ -308,13 +308,13 @@ START_TEST(eina_matrix4_operation)
&yx, &yy, &yz, &yw, &yx, &yy, &yz, &yw,
&zx, &zy, &zz, &zw, &zx, &zy, &zz, &zw,
&wx, &wy, &wz, &ww); &wx, &wy, &wz, &ww);
fail_if (!EINA_DBL_CMP(xx, -2) || fail_if (!EINA_DBL_EQ(xx, -2) ||
!EINA_DBL_CMP(yy, -2) || !EINA_DBL_EQ(yy, -2) ||
!EINA_DBL_CMP(zz, 2) || !EINA_DBL_EQ(zz, 2) ||
!EINA_DBL_CMP(wx, 9) || !EINA_DBL_EQ(wx, 9) ||
!EINA_DBL_CMP(wy, 7) || !EINA_DBL_EQ(wy, 7) ||
!EINA_DBL_CMP(wz, 5) || !EINA_DBL_EQ(wz, 5) ||
!EINA_DBL_CMP(ww, 1)); !EINA_DBL_EQ(ww, 1));
} }
END_TEST END_TEST
@ -370,14 +370,14 @@ START_TEST(eina_matrix3)
&yx, &yy, &yz, &yx, &yy, &yz,
&zx, &zy, &zz); &zx, &zy, &zz);
fail_if(!EINA_DBL_CMP(xx, yy) || fail_if(!EINA_DBL_EQ(xx, yy) ||
!EINA_DBL_CMP(yy, zz) || !EINA_DBL_EQ(yy, zz) ||
!EINA_DBL_CMP(zz, 1)); !EINA_DBL_EQ(zz, 1));
fail_if(!EINA_DBL_CMP(xy, xz) || fail_if(!EINA_DBL_EQ(xy, xz) ||
!EINA_DBL_CMP(yx, yz) || !EINA_DBL_EQ(yx, yz) ||
!EINA_DBL_CMP(zx, zy) || !EINA_DBL_EQ(zx, zy) ||
!EINA_DBL_CMP(zy, 0)); !EINA_DBL_EQ(zy, 0));
ret = eina_matrix3_equal(&m, &m1); ret = eina_matrix3_equal(&m, &m1);
fail_if(ret != EINA_TRUE); fail_if(ret != EINA_TRUE);
@ -390,15 +390,15 @@ START_TEST(eina_matrix3)
END_TEST END_TEST
#define MATRIX3_CMP(XX, XY, XZ, YX, YY, YZ, ZX, ZY, ZZ, AXX, AXY, AXZ, AYX, AYY, AYZ, AZX, AZY, AZZ) \ #define MATRIX3_CMP(XX, XY, XZ, YX, YY, YZ, ZX, ZY, ZZ, AXX, AXY, AXZ, AYX, AYY, AYZ, AZX, AZY, AZZ) \
(EINA_DBL_CMP(XX, AXX) && \ (EINA_DBL_EQ(XX, AXX) && \
EINA_DBL_CMP(XY, AXY) && \ EINA_DBL_EQ(XY, AXY) && \
EINA_DBL_CMP(XZ, AXZ) && \ EINA_DBL_EQ(XZ, AXZ) && \
EINA_DBL_CMP(YX, AYX) && \ EINA_DBL_EQ(YX, AYX) && \
EINA_DBL_CMP(YY, AYY) && \ EINA_DBL_EQ(YY, AYY) && \
EINA_DBL_CMP(YZ, AYZ) && \ EINA_DBL_EQ(YZ, AYZ) && \
EINA_DBL_CMP(ZX, AZX) && \ EINA_DBL_EQ(ZX, AZX) && \
EINA_DBL_CMP(ZY, AZY) && \ EINA_DBL_EQ(ZY, AZY) && \
EINA_DBL_CMP(ZZ, AZZ)) EINA_DBL_EQ(ZZ, AZZ))
START_TEST(eina_matrix3_operations) START_TEST(eina_matrix3_operations)
{ {
@ -425,13 +425,13 @@ START_TEST(eina_matrix3_operations)
&xx, &xy, &xz, &xx, &xy, &xz,
&yx, &yy, &yz, &yx, &yy, &yz,
&zx, &zy, &zz); &zx, &zy, &zz);
fail_if (!EINA_DBL_CMP(xx, xy) || fail_if (!EINA_DBL_EQ(xx, xy) ||
!EINA_DBL_CMP(xy, xz) || !EINA_DBL_EQ(xy, xz) ||
!EINA_DBL_CMP(yx, yy) || !EINA_DBL_EQ(yx, yy) ||
!EINA_DBL_CMP(yy, yz) || !EINA_DBL_EQ(yy, yz) ||
!EINA_DBL_CMP(zx, zy) || !EINA_DBL_EQ(zx, zy) ||
!EINA_DBL_CMP(zy, zz) || !EINA_DBL_EQ(zy, zz) ||
!EINA_DBL_CMP(zz, 1)); !EINA_DBL_EQ(zz, 1));
eina_matrix3_translate(&m1, tx, ty); eina_matrix3_translate(&m1, tx, ty);
eina_matrix3_values_get(&m1, eina_matrix3_values_get(&m1,
@ -484,21 +484,21 @@ START_TEST(eina_matrix3_operations)
&xx, &xy, &xz, &xx, &xy, &xz,
&yx, &yy, &yz, &yx, &yy, &yz,
&zx, &zy, &zz); &zx, &zy, &zz);
fail_if(!EINA_DBL_CMP(xx, yy) || fail_if(!EINA_DBL_EQ(xx, yy) ||
!EINA_DBL_CMP(yy, zz) || !EINA_DBL_EQ(yy, zz) ||
!EINA_DBL_CMP(zz, 1)); !EINA_DBL_EQ(zz, 1));
fail_if(!EINA_DBL_CMP(xy, xz) || fail_if(!EINA_DBL_EQ(xy, xz) ||
!EINA_DBL_CMP(yx, yz) || !EINA_DBL_EQ(yx, yz) ||
!EINA_DBL_CMP(zx, zy) || !EINA_DBL_EQ(zx, zy) ||
!EINA_DBL_CMP(zy, 0)); !EINA_DBL_EQ(zy, 0));
eina_matrix3_values_set(&m1, eina_matrix3_values_set(&m1,
1, 2, 1, 1, 2, 1,
2, 1, 1, 2, 1, 1,
1, 2, 2); 1, 2, 2);
ret = eina_matrix3_determinant(&m1); ret = eina_matrix3_determinant(&m1);
fail_if(!EINA_DBL_CMP(ret, -3)); fail_if(!EINA_DBL_EQ(ret, -3));
eina_matrix3_values_set(&m1, eina_matrix3_values_set(&m1,
3, 3, 3, 3, 3, 3,
@ -509,13 +509,13 @@ START_TEST(eina_matrix3_operations)
&xx, &xy, &xz, &xx, &xy, &xz,
&yx, &yy, &yz, &yx, &yy, &yz,
&zx, &zy, &zz); &zx, &zy, &zz);
fail_if (!EINA_DBL_CMP(xx, xy) || fail_if (!EINA_DBL_EQ(xx, xy) ||
!EINA_DBL_CMP(xy, xz) || !EINA_DBL_EQ(xy, xz) ||
!EINA_DBL_CMP(yx, yy) || !EINA_DBL_EQ(yx, yy) ||
!EINA_DBL_CMP(yy, yz) || !EINA_DBL_EQ(yy, yz) ||
!EINA_DBL_CMP(zx, zy) || !EINA_DBL_EQ(zx, zy) ||
!EINA_DBL_CMP(zy, zz) || !EINA_DBL_EQ(zy, zz) ||
!EINA_DBL_CMP(zz, 1.5)); !EINA_DBL_EQ(zz, 1.5));
eina_matrix3_values_set(&m1, eina_matrix3_values_set(&m1,
0, 2, 0, 0, 2, 0,
@ -642,16 +642,16 @@ START_TEST(eina_matrix3_operations)
&xx, &xy, &xz, &xx, &xy, &xz,
&yx, &yy, &yz, &yx, &yy, &yz,
&zx, &zy, &zz); &zx, &zy, &zz);
fail_if (!EINA_DBL_CMP(xz, 5) || fail_if (!EINA_DBL_EQ(xz, 5) ||
!EINA_DBL_CMP(yz, 3)); !EINA_DBL_EQ(yz, 3));
eina_matrix3_scale_transform_set(&m2, 6, 7); eina_matrix3_scale_transform_set(&m2, 6, 7);
eina_matrix3_values_get(&m2, eina_matrix3_values_get(&m2,
&xx, &xy, &xz, &xx, &xy, &xz,
&yx, &yy, &yz, &yx, &yy, &yz,
&zx, &zy, &zz); &zx, &zy, &zz);
fail_if (!EINA_DBL_CMP(xx, 6) || fail_if (!EINA_DBL_EQ(xx, 6) ||
!EINA_DBL_CMP(yy, 7)); !EINA_DBL_EQ(yy, 7));
} }
END_TEST END_TEST
@ -737,20 +737,20 @@ START_TEST(eina_matrix3_map_transform)
eina_matrix3_point_transform(&m, eina_matrix3_point_transform(&m,
x, y, x, y,
&x1, &y1); &x1, &y1);
fail_if(!EINA_DBL_CMP(x1, 3) || fail_if(!EINA_DBL_EQ(x1, 3) ||
!EINA_DBL_CMP(y1, 2)); !EINA_DBL_EQ(y1, 2));
EINA_RECTANGLE_SET(&r, 0, 0, 3, 4); EINA_RECTANGLE_SET(&r, 0, 0, 3, 4);
eina_matrix3_rectangle_transform(&m, &r, &q); eina_matrix3_rectangle_transform(&m, &r, &q);
fail_if(!EINA_DBL_CMP(q.x0, 0) || fail_if(!EINA_DBL_EQ(q.x0, 0) ||
!EINA_DBL_CMP(q.y0, 0) || !EINA_DBL_EQ(q.y0, 0) ||
!EINA_DBL_CMP(q.x1, 0) || !EINA_DBL_EQ(q.x1, 0) ||
!EINA_DBL_CMP(q.y1, 3) || !EINA_DBL_EQ(q.y1, 3) ||
!EINA_DBL_CMP(q.x2, 4) || !EINA_DBL_EQ(q.x2, 4) ||
!EINA_DBL_CMP(q.y2, 3) || !EINA_DBL_EQ(q.y2, 3) ||
!EINA_DBL_CMP(q.x3, 4) || !EINA_DBL_EQ(q.x3, 4) ||
!EINA_DBL_CMP(q.y3, 0)); !EINA_DBL_EQ(q.y3, 0));
eina_quad_coords_set(&q, eina_quad_coords_set(&q,
0.0, 0.0, 0.0, 0.0,
@ -770,14 +770,14 @@ START_TEST(eina_matrix3_map_transform)
ret = eina_matrix3_quad_square_map(&m, &q); ret = eina_matrix3_quad_square_map(&m, &q);
fail_if(ret != EINA_TRUE); fail_if(ret != EINA_TRUE);
fail_if(!EINA_DBL_CMP(q.x0, 0) || fail_if(!EINA_DBL_EQ(q.x0, 0) ||
!EINA_DBL_CMP(q.y0, 0) || !EINA_DBL_EQ(q.y0, 0) ||
!EINA_DBL_CMP(q.x1, 3) || !EINA_DBL_EQ(q.x1, 3) ||
!EINA_DBL_CMP(q.y1, 0) || !EINA_DBL_EQ(q.y1, 0) ||
!EINA_DBL_CMP(q.x2, 3) || !EINA_DBL_EQ(q.x2, 3) ||
!EINA_DBL_CMP(q.y2, 3) || !EINA_DBL_EQ(q.y2, 3) ||
!EINA_DBL_CMP(q.x3, 0) || !EINA_DBL_EQ(q.x3, 0) ||
!EINA_DBL_CMP(q.y3, 3)); !EINA_DBL_EQ(q.y3, 3));
eina_shutdown(); eina_shutdown();
} }

View File

@ -29,20 +29,20 @@ START_TEST(eina_quad_simple)
&x1, &y1, &x1, &y1,
&x2, &y2, &x2, &y2,
&x3, &y3); &x3, &y3);
fail_if (!EINA_FLT_CMP(r2.x0, 0.0) || fail_if (!EINA_FLT_EQ(r2.x0, 0.0) ||
!EINA_FLT_CMP(r2.y0, 5.0) || !EINA_FLT_EQ(r2.y0, 5.0) ||
!EINA_FLT_CMP(r2.x1, 5.0) || !EINA_FLT_EQ(r2.x1, 5.0) ||
!EINA_FLT_CMP(r2.y1, 0.0) || !EINA_FLT_EQ(r2.y1, 0.0) ||
!EINA_FLT_CMP(r2.x2, 10.0) || !EINA_FLT_EQ(r2.x2, 10.0) ||
!EINA_FLT_CMP(r2.y2, 5.0) || !EINA_FLT_EQ(r2.y2, 5.0) ||
!EINA_FLT_CMP(r2.x3, 5.0) || !EINA_FLT_EQ(r2.x3, 5.0) ||
!EINA_FLT_CMP(r2.y3, 10.0)); !EINA_FLT_EQ(r2.y3, 10.0));
eina_quad_rectangle_to(&r2, &r1); eina_quad_rectangle_to(&r2, &r1);
fail_if (!EINA_FLT_CMP(r1.x, 0) || fail_if (!EINA_FLT_EQ(r1.x, 0) ||
!EINA_FLT_CMP(r1.y, 0) || !EINA_FLT_EQ(r1.y, 0) ||
!EINA_FLT_CMP(r1.w, 10) || !EINA_FLT_EQ(r1.w, 10) ||
!EINA_FLT_CMP(r1.h, 10)); !EINA_FLT_EQ(r1.h, 10));
eina_quad_coords_set(&r2, eina_quad_coords_set(&r2,
0.0, 0.0, 0.0, 0.0,
@ -50,21 +50,21 @@ START_TEST(eina_quad_simple)
0.0, 0.0, 0.0, 0.0,
0.0, 0.0); 0.0, 0.0);
eina_quad_rectangle_to(&r2, &r1); eina_quad_rectangle_to(&r2, &r1);
fail_if (!EINA_FLT_CMP(r1.x, 0) || fail_if (!EINA_FLT_EQ(r1.x, 0) ||
!EINA_FLT_CMP(r1.y, 0) || !EINA_FLT_EQ(r1.y, 0) ||
!EINA_FLT_CMP(r1.w, 0) || !EINA_FLT_EQ(r1.w, 0) ||
!EINA_FLT_CMP(r1.h, 0)); !EINA_FLT_EQ(r1.h, 0));
EINA_RECTANGLE_SET(&r1, 5, 10, 20, 30); EINA_RECTANGLE_SET(&r1, 5, 10, 20, 30);
eina_quad_rectangle_from(&r2, &r1); eina_quad_rectangle_from(&r2, &r1);
fail_if (!EINA_FLT_CMP(r2.x0, 5.0) || fail_if (!EINA_FLT_EQ(r2.x0, 5.0) ||
!EINA_FLT_CMP(r2.y0, 10.0) || !EINA_FLT_EQ(r2.y0, 10.0) ||
!EINA_FLT_CMP(r2.x1, 25.0) || !EINA_FLT_EQ(r2.x1, 25.0) ||
!EINA_FLT_CMP(r2.y1, 10.0) || !EINA_FLT_EQ(r2.y1, 10.0) ||
!EINA_FLT_CMP(r2.x2, 25.0) || !EINA_FLT_EQ(r2.x2, 25.0) ||
!EINA_FLT_CMP(r2.y2, 40.0) || !EINA_FLT_EQ(r2.y2, 40.0) ||
!EINA_FLT_CMP(r2.x3, 5.0) || !EINA_FLT_EQ(r2.x3, 5.0) ||
!EINA_FLT_CMP(r2.y3, 40.0)); !EINA_FLT_EQ(r2.y3, 40.0));
eina_shutdown(); eina_shutdown();
} }

View File

@ -31,10 +31,10 @@
static inline Eina_Bool static inline Eina_Bool
eina_quaternion_cmp(const Eina_Quaternion *a, const Eina_Quaternion *b) eina_quaternion_cmp(const Eina_Quaternion *a, const Eina_Quaternion *b)
{ {
if (EINA_FLT_CMP(a->x, b->x) && if (EINA_FLT_EQ(a->x, b->x) &&
EINA_FLT_CMP(a->y, b->y) && EINA_FLT_EQ(a->y, b->y) &&
EINA_FLT_CMP(a->z, b->z) && EINA_FLT_EQ(a->z, b->z) &&
EINA_FLT_CMP(a->w, b->w)) EINA_FLT_EQ(a->w, b->w))
return EINA_TRUE; return EINA_TRUE;
return EINA_FALSE; return EINA_FALSE;
} }
@ -42,15 +42,15 @@ eina_quaternion_cmp(const Eina_Quaternion *a, const Eina_Quaternion *b)
static inline Eina_Bool static inline Eina_Bool
eina_matrix3_cmp(const Eina_Matrix3 *a, const Eina_Matrix3 *b) eina_matrix3_cmp(const Eina_Matrix3 *a, const Eina_Matrix3 *b)
{ {
if (EINA_FLT_CMP(a->xx, b->xx) && if (EINA_FLT_EQ(a->xx, b->xx) &&
EINA_FLT_CMP(a->xy, b->xy) && EINA_FLT_EQ(a->xy, b->xy) &&
EINA_FLT_CMP(a->xz, b->xz) && EINA_FLT_EQ(a->xz, b->xz) &&
EINA_FLT_CMP(a->yx, b->yx) && EINA_FLT_EQ(a->yx, b->yx) &&
EINA_FLT_CMP(a->yy, b->yy) && EINA_FLT_EQ(a->yy, b->yy) &&
EINA_FLT_CMP(a->yz, b->yz) && EINA_FLT_EQ(a->yz, b->yz) &&
EINA_FLT_CMP(a->zx, b->zx) && EINA_FLT_EQ(a->zx, b->zx) &&
EINA_FLT_CMP(a->zy, b->zy) && EINA_FLT_EQ(a->zy, b->zy) &&
EINA_FLT_CMP(a->zz, b->zz)) EINA_FLT_EQ(a->zz, b->zz))
return EINA_TRUE; return EINA_TRUE;
return EINA_FALSE; return EINA_FALSE;
} }
@ -74,9 +74,9 @@ eina_matrix3_f16p16_cmp(const Eina_Matrix3_F16p16 *a, const Eina_Matrix3_F16p16
static inline Eina_Bool static inline Eina_Bool
eina_point_3d_cmp(const Eina_Point_3D *a, const Eina_Point_3D *b) eina_point_3d_cmp(const Eina_Point_3D *a, const Eina_Point_3D *b)
{ {
if (EINA_FLT_CMP(a->x, b->x) && if (EINA_FLT_EQ(a->x, b->x) &&
EINA_FLT_CMP(a->y, b->y) && EINA_FLT_EQ(a->y, b->y) &&
EINA_FLT_CMP(a->z, b->z)) EINA_FLT_EQ(a->z, b->z))
return EINA_TRUE; return EINA_TRUE;
return EINA_FALSE; return EINA_FALSE;
} }
@ -99,7 +99,7 @@ START_TEST(eina_test_quaternion_norm)
eina_init(); eina_init();
fail_if(!EINA_FLT_CMP(result, sqrt(51))); fail_if(!EINA_FLT_EQ(result, sqrt(51)));
eina_shutdown(); eina_shutdown();
} }

View File

@ -336,7 +336,7 @@ START_TEST(str_memdup)
t2 = (struct temp *)eina_memdup((unsigned char *)&t1, sizeof(struct temp), EINA_TRUE); t2 = (struct temp *)eina_memdup((unsigned char *)&t1, sizeof(struct temp), EINA_TRUE);
fail_if(t2->i != t1.i); fail_if(t2->i != t1.i);
fail_if(strcmp(t2->s,t1.s) != 0); fail_if(strcmp(t2->s,t1.s) != 0);
fail_if(!EINA_FLT_CMP(t2->d, t1.d)); fail_if(!EINA_FLT_EQ(t2->d, t1.d));
free(t2); free(t2);
memcpy(buf, "aaabbb", 6); memcpy(buf, "aaabbb", 6);

View File

@ -283,7 +283,7 @@ START_TEST(eina_test_xattr_types)
fail_if(ret != EINA_TRUE); fail_if(ret != EINA_TRUE);
ret = eina_xattr_double_get(test_file_path, double_attr, &double_ret); ret = eina_xattr_double_get(test_file_path, double_attr, &double_ret);
fail_if(ret != EINA_TRUE); fail_if(ret != EINA_TRUE);
fail_if(!EINA_DBL_CMP(double_data, double_ret)); fail_if(!EINA_DBL_EQ(double_data, double_ret));
close(fd); close(fd);
unlink(test_file_path); unlink(test_file_path);

View File

@ -115,7 +115,7 @@ _done_int_cb(void *data EINA_UNUSED, Eio_File *handler EINA_UNUSED, int xattr_in
static void static void
_done_double_cb(void *data EINA_UNUSED, Eio_File *handler EINA_UNUSED, double xattr_double) _done_double_cb(void *data EINA_UNUSED, Eio_File *handler EINA_UNUSED, double xattr_double)
{ {
fail_if(!EINA_DBL_CMP(xattr_double, double_data)); fail_if(!EINA_DBL_EQ(xattr_double, double_data));
ecore_main_loop_quit(); ecore_main_loop_quit();
} }