Curve Fitting: sync with upstream
authorCampbell Barton <ideasman42@gmail.com>
Thu, 4 Aug 2016 22:34:23 +0000 (08:34 +1000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 4 Aug 2016 22:36:17 +0000 (08:36 +1000)
Correct accidental float use

extern/curve_fit_nd/intern/curve_fit_cubic.c

index 9c8ebcd098b1c83a5b0c0eb4ffe816d429965d1b..417b41d992c6b6768c0bf6595a63af05690652f3 100644 (file)
@@ -623,13 +623,13 @@ static void cubic_from_points_offset_fallback(
                }
        }
 
-       float alpha_l = (dists[0] / 0.75) /  dot_vnvn(tan_l, a[0], dims);
-       float alpha_r = (dists[1] / 0.75) / -dot_vnvn(tan_r, a[1], dims);
+       double alpha_l = (dists[0] / 0.75) /  dot_vnvn(tan_l, a[0], dims);
+       double alpha_r = (dists[1] / 0.75) / -dot_vnvn(tan_r, a[1], dims);
 
-       if (!(alpha_l > 0.0f)) {
+       if (!(alpha_l > 0.0)) {
                alpha_l = dir_dist / 3.0;
        }
-       if (!(alpha_r > 0.0f)) {
+       if (!(alpha_r > 0.0)) {
                alpha_r = dir_dist / 3.0;
        }