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:
Diffstat (limited to 'source/blender/blenlib/BLI_math_base.h')
-rw-r--r--source/blender/blenlib/BLI_math_base.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/blenlib/BLI_math_base.h b/source/blender/blenlib/BLI_math_base.h
index 46219ad5493..5a3482db046 100644
--- a/source/blender/blenlib/BLI_math_base.h
+++ b/source/blender/blenlib/BLI_math_base.h
@@ -237,6 +237,7 @@ float ceil_power_of_10(float f);
#ifndef NDEBUG
/** \note 0.0001 is too small because normals may be converted from short's: see T34322. */
# define BLI_ASSERT_UNIT_EPSILON 0.0002f
+# define BLI_ASSERT_UNIT_EPSILON_DB 0.0002
/**
* \note Checks are flipped so NAN doesn't assert.
* This is done because we're making sure the value was normalized and in the case we
@@ -253,8 +254,8 @@ float ceil_power_of_10(float f);
# define BLI_ASSERT_UNIT_V3_DB(v) \
{ \
const double _test_unit = len_squared_v3_db(v); \
- BLI_assert(!(fabs(_test_unit - 1.0) >= BLI_ASSERT_UNIT_EPSILON) || \
- !(fabs(_test_unit) >= BLI_ASSERT_UNIT_EPSILON)); \
+ BLI_assert(!(fabs(_test_unit - 1.0) >= BLI_ASSERT_UNIT_EPSILON_DB) || \
+ !(fabs(_test_unit) >= BLI_ASSERT_UNIT_EPSILON_DB)); \
} \
(void)0