Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-02-19 18:14:37 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-02-19 18:14:37 +0400
commit917252175dce5d4425de76763b2b4d4c88391283 (patch)
treee5ab2ed43cce2daf1d7c4db87831e831c1f22f58
parentba375ae699b9f58b0e82276790471a68e438311e (diff)
internal: increase error threshold for normalize assert since normals converted from shorts are not always exactly unit length.
-rw-r--r--source/blender/blenlib/BLI_math_base.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/blenlib/BLI_math_base.h b/source/blender/blenlib/BLI_math_base.h
index 639512f7433..aa4e697b48b 100644
--- a/source/blender/blenlib/BLI_math_base.h
+++ b/source/blender/blenlib/BLI_math_base.h
@@ -221,7 +221,8 @@ double double_round(double x, int ndigits);
* 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) || \