diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-02-19 18:14:37 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-02-19 18:14:37 +0400 |
commit | 917252175dce5d4425de76763b2b4d4c88391283 (patch) | |
tree | e5ab2ed43cce2daf1d7c4db87831e831c1f22f58 /source/blender/blenlib/BLI_math_base.h | |
parent | ba375ae699b9f58b0e82276790471a68e438311e (diff) |
internal: increase error threshold for normalize assert since normals converted from shorts are not always exactly unit length.
Diffstat (limited to 'source/blender/blenlib/BLI_math_base.h')
-rw-r--r-- | source/blender/blenlib/BLI_math_base.h | 3 |
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) || \ |