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