[Bf-blender-cvs] [c04e73f] master: Math Lib: use less strict epsilon with BLI_ASSERT_UNIT_QUAT

Campbell Barton noreply at git.blender.org
Fri Apr 11 10:20:59 CEST 2014


Commit: c04e73f38638e37b07b5ce6e0483cb96b7143580
Author: Campbell Barton
Date:   Fri Apr 11 18:17:59 2014 +1000
https://developer.blender.org/rBc04e73f38638e37b07b5ce6e0483cb96b7143580

Math Lib: use less strict epsilon with BLI_ASSERT_UNIT_QUAT

was causing issues with pointcache

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

M	source/blender/blenlib/BLI_math_base.h

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

diff --git a/source/blender/blenlib/BLI_math_base.h b/source/blender/blenlib/BLI_math_base.h
index 5458def..de35ccd 100644
--- a/source/blender/blenlib/BLI_math_base.h
+++ b/source/blender/blenlib/BLI_math_base.h
@@ -274,8 +274,8 @@ double double_round(double x, int ndigits);
 
 #  define BLI_ASSERT_UNIT_QUAT(q)  {                                          \
 	const float _test_unit = dot_qtqt(q, q);                                  \
-	BLI_assert((fabsf(_test_unit - 1.0f) < BLI_ASSERT_UNIT_EPSILON) ||        \
-	           (fabsf(_test_unit)        < BLI_ASSERT_UNIT_EPSILON));         \
+	BLI_assert((fabsf(_test_unit - 1.0f) < BLI_ASSERT_UNIT_EPSILON * 10) ||   \
+	           (fabsf(_test_unit)        < BLI_ASSERT_UNIT_EPSILON * 10));    \
 } (void)0
 
 #  define BLI_ASSERT_ZERO_M3(m)  {                                            \




More information about the Bf-blender-cvs mailing list