[Bf-blender-cvs] [6b5ad4a] master: Curve Fitting: 'offset' method used sign when it shouldn't
Campbell Barton
noreply at git.blender.org
Sun Sep 25 04:19:16 CEST 2016
Commit: 6b5ad4a4d7039a78c4d7dc0315e855787b4dd10b
Author: Campbell Barton
Date: Sun Sep 25 12:03:10 2016 +1000
Branches: master
https://developer.blender.org/rB6b5ad4a4d7039a78c4d7dc0315e855787b4dd10b
Curve Fitting: 'offset' method used sign when it shouldn't
===================================================================
M extern/curve_fit_nd/intern/curve_fit_cubic.c
===================================================================
diff --git a/extern/curve_fit_nd/intern/curve_fit_cubic.c b/extern/curve_fit_nd/intern/curve_fit_cubic.c
index ea482a1..0a32f1e 100644
--- a/extern/curve_fit_nd/intern/curve_fit_cubic.c
+++ b/extern/curve_fit_nd/intern/curve_fit_cubic.c
@@ -611,8 +611,8 @@ static void cubic_from_points_offset_fallback(
}
}
- 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);
+ double alpha_l = (dists[0] / 0.75) / fabs(dot_vnvn(tan_l, a[0], dims));
+ double alpha_r = (dists[1] / 0.75) / fabs(dot_vnvn(tan_r, a[1], dims));
if (!(alpha_l > 0.0)) {
alpha_l = dir_dist / 3.0;
More information about the Bf-blender-cvs
mailing list