MetaBorder: Use float constants and functions instead of double variants

We calculate with floats, so lets use that type throughout.

https://bugzilla.gnome.org/show_bug.cgi?id=744104
This commit is contained in:
Jonas Ådahl 2015-07-07 13:06:27 +08:00
parent 495c89401a
commit bc1dd1cee4

View File

@ -92,7 +92,7 @@ meta_line2_intersects_with (const MetaLine2 *line1,
sxr = meta_vector2_cross_product (s, r); sxr = meta_vector2_cross_product (s, r);
/* If r × s = 0 then the lines are either parallel or collinear. */ /* If r × s = 0 then the lines are either parallel or collinear. */
if (fabs (rxs) < DBL_MIN) if (fabsf (rxs) < FLT_MIN)
return FALSE; return FALSE;
t = meta_vector2_cross_product (meta_vector2_subtract (q, p), s) / rxs; t = meta_vector2_cross_product (meta_vector2_subtract (q, p), s) / rxs;