app: allow 0.0 precision for gimp_coords_interpolate_bezier().

All it will mean is that we are looking for perfectly straight lines
when deciding if a bezier curve can be considered straight. It's a fair
condition and represents perfectly what a precision of 0.0 would mean.
This commit is contained in:
Jehan 2021-01-20 20:14:06 +01:00
parent 00bbeabaf4
commit e813d90fbb
1 changed files with 2 additions and 2 deletions

View File

@ -52,7 +52,7 @@ gimp_coords_interpolate_bezier (const GimpCoords bezier_pt[4],
GArray *ret_params)
{
g_return_if_fail (bezier_pt != NULL);
g_return_if_fail (precision > 0.0);
g_return_if_fail (precision >= 0.0);
g_return_if_fail (ret_coords != NULL);
gimp_coords_interpolate_bezier_internal (bezier_pt,
@ -217,7 +217,7 @@ gimp_coords_bezier_is_straight (const GimpCoords bezier_pt[4],
GimpCoords pt1, pt2;
g_return_val_if_fail (bezier_pt != NULL, FALSE);
g_return_val_if_fail (precision > 0.0, FALSE);
g_return_val_if_fail (precision >= 0.0, FALSE);
/* calculate the "ideal" positions for the control points */