[Bf-blender-cvs] [4c6fa39] temp-curve-draw: Flip handle length check to catch nan values
Campbell Barton
noreply at git.blender.org
Thu Apr 14 05:37:35 CEST 2016
Commit: 4c6fa392620d05bfcb95eaffe87d2eeb4833a32f
Author: Campbell Barton
Date: Thu Apr 14 13:08:29 2016 +1000
Branches: temp-curve-draw
https://developer.blender.org/rB4c6fa392620d05bfcb95eaffe87d2eeb4833a32f
Flip handle length check to catch nan values
===================================================================
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 8590d7f..9715601 100644
--- a/extern/curve_fit_nd/intern/curve_fit_cubic.c
+++ b/extern/curve_fit_nd/intern/curve_fit_cubic.c
@@ -462,7 +462,10 @@ static void cubic_from_points(
* so only problems absurd of approximation and not for bugs in the code.
*/
- if (alpha_l < 0.0 || alpha_r < 0.0) {
+ /* flip check to catch nan values */
+ if (!(alpha_l >= 0.0) ||
+ !(alpha_r >= 0.0))
+ {
alpha_l = alpha_r = len_vnvn(p0, p3, dims) / 3.0;
}
More information about the Bf-blender-cvs
mailing list