[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [54665] trunk/blender/source/blender/ blenlib/BLI_math_base.h: internal: increase error threshold for normalize assert since normals converted from shorts are not always exactly unit length .
Campbell Barton
ideasman42 at gmail.com
Tue Feb 19 15:14:37 CET 2013
Revision: 54665
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=54665
Author: campbellbarton
Date: 2013-02-19 14:14:37 +0000 (Tue, 19 Feb 2013)
Log Message:
-----------
internal: increase error threshold for normalize assert since normals converted from shorts are not always exactly unit length.
Modified Paths:
--------------
trunk/blender/source/blender/blenlib/BLI_math_base.h
Modified: trunk/blender/source/blender/blenlib/BLI_math_base.h
===================================================================
--- trunk/blender/source/blender/blenlib/BLI_math_base.h 2013-02-19 13:41:58 UTC (rev 54664)
+++ trunk/blender/source/blender/blenlib/BLI_math_base.h 2013-02-19 14:14:37 UTC (rev 54665)
@@ -221,7 +221,8 @@
* check the vector is unit length, or zero length (which can't be helped in some cases).
*/
#ifdef DEBUG
-# define BLI_ASSERT_UNIT_EPSILON 0.0001f
+/* note: 0.0001 is too small becaues normals may be converted from short's: see [#34322] */
+# define BLI_ASSERT_UNIT_EPSILON 0.0002f
# define BLI_ASSERT_UNIT_V3(v) { \
const float _test_unit = len_squared_v3(v); \
BLI_assert((fabsf(_test_unit - 1.0f) < BLI_ASSERT_UNIT_EPSILON) || \
More information about the Bf-blender-cvs
mailing list