Math Lib: add angle_qt functions
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user