[Bf-blender-cvs] [3f7ea74] master: Cleanup: quiet assert for zero-length axis

Campbell Barton noreply at git.blender.org
Mon Jun 15 20:20:46 CEST 2015


Commit: 3f7ea7489ee172be54f320b948167f9ca61a4eb3
Author: Campbell Barton
Date:   Tue Jun 16 03:59:43 2015 +1000
Branches: master
https://developer.blender.org/rB3f7ea7489ee172be54f320b948167f9ca61a4eb3

Cleanup: quiet assert for zero-length axis

===================================================================

M	source/blender/blenlib/intern/math_geom.c

===================================================================

diff --git a/source/blender/blenlib/intern/math_geom.c b/source/blender/blenlib/intern/math_geom.c
index 82062e8..ad48711 100644
--- a/source/blender/blenlib/intern/math_geom.c
+++ b/source/blender/blenlib/intern/math_geom.c
@@ -2337,7 +2337,7 @@ void axis_dominant_v3_to_m3(float r_mat[3][3], const float normal[3])
 	transpose_m3(r_mat);
 
 	BLI_assert(!is_negative_m3(r_mat));
-	BLI_assert(fabsf(dot_m3_v3_row_z(r_mat, normal) - 1.0f) < BLI_ASSERT_UNIT_EPSILON);
+	BLI_assert((fabsf(dot_m3_v3_row_z(r_mat, normal) - 1.0f) < BLI_ASSERT_UNIT_EPSILON) || is_zero_v3(normal));
 }
 
 /****************************** Interpolation ********************************/




More information about the Bf-blender-cvs mailing list