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>2014-03-20 07:39:32 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-03-20 08:15:29 +0400
commitc6252d6e608a0dff72a8d5fde404fa6bd2c7ca7b (patch)
tree56367146d49417839143c93852298fcdebfc6648 /source/blender/blenlib/BLI_math_base.h
parentaee30184f3a2f332edf9eaf256a0a23beca26673 (diff)
Math Lib: add angle_qt functions
Diffstat (limited to 'source/blender/blenlib/BLI_math_base.h')
-rw-r--r--source/blender/blenlib/BLI_math_base.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_math_base.h b/source/blender/blenlib/BLI_math_base.h
index ef05777dc2f..63a9bac288e 100644
--- a/source/blender/blenlib/BLI_math_base.h
+++ b/source/blender/blenlib/BLI_math_base.h
@@ -269,6 +269,12 @@ double double_round(double x, int ndigits);
(fabsf(_test_unit) < BLI_ASSERT_UNIT_EPSILON)); \
} (void)0
+# define BLI_ASSERT_UNIT_QUAT(q) { \
+ const float _test_unit = dot_qtqt(q, q); \
+ BLI_assert((fabsf(_test_unit - 1.0f) < BLI_ASSERT_UNIT_EPSILON) || \
+ (fabsf(_test_unit) < BLI_ASSERT_UNIT_EPSILON)); \
+} (void)0
+
# define BLI_ASSERT_ZERO_M3(m) { \
BLI_assert(dot_vn_vn((const float *)m, (const float *)m, 9) != 0.0); \
} (void)0
@@ -279,6 +285,7 @@ double double_round(double x, int ndigits);
#else
# define BLI_ASSERT_UNIT_V2(v) (void)(v)
# define BLI_ASSERT_UNIT_V3(v) (void)(v)
+# define BLI_ASSERT_UNIT_QUAT(v) (void)(v)
# define BLI_ASSERT_ZERO_M3(m) (void)(m)
# define BLI_ASSERT_ZERO_M4(m) (void)(m)
#endif