diff options
author | mattoverby <mattoverby@gmail.com> | 2020-08-28 23:00:01 +0300 |
---|---|---|
committer | mattoverby <mattoverby@gmail.com> | 2020-08-28 23:00:01 +0300 |
commit | 44819c69a4e702b224c4ba166def9e212bee6d92 (patch) | |
tree | 45f0349bd9ad29892d14b0f63d496b309cd32ed8 /source/blender/blenlib/BLI_math_base.h | |
parent | 6c32148cd2ea90cde4d4e46beb5ad4969b044c49 (diff) | |
parent | 019cd2e56b377a35b1fa2c85aebe60fb8c495335 (diff) |
fixed submodulessoc-2020-soft-body
Diffstat (limited to 'source/blender/blenlib/BLI_math_base.h')
-rw-r--r-- | source/blender/blenlib/BLI_math_base.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_math_base.h b/source/blender/blenlib/BLI_math_base.h index f407da3133f..d2bb60717ca 100644 --- a/source/blender/blenlib/BLI_math_base.h +++ b/source/blender/blenlib/BLI_math_base.h @@ -242,6 +242,14 @@ double double_round(double x, int ndigits); } \ (void)0 +# 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)); \ + } \ + (void)0 + # define BLI_ASSERT_UNIT_V2(v) \ { \ const float _test_unit = len_squared_v2(v); \ |