MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / get_euler_normalized

Method get_euler_normalized

core/math/basis.cpp:367–376  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

365}
366
367Vector3 Basis::get_euler_normalized(EulerOrder p_order) const {
368 Basis m = orthonormalized();
369 real_t det = m.determinant();
370 if (det < 0) {
371 // Ensure that the determinant is 1, such that result is a proper rotation matrix which can be represented by Euler angles.
372 m.scale(Vector3(-1, -1, -1));
373 }
374
375 return m.get_euler(p_order);
376}
377
378Quaternion Basis::get_rotation_quaternion() const {
379 Basis m = orthonormalized();

Callers 8

correct_postureMethod · 0.80
set_quaternionMethod · 0.80
set_rotation_orderMethod · 0.80
set_scaleMethod · 0.80
_property_get_revertMethod · 0.80
get_joint_rotationMethod · 0.80
_menu_optionMethod · 0.80

Calls 4

Vector3Function · 0.70
determinantMethod · 0.45
scaleMethod · 0.45
get_eulerMethod · 0.45

Tested by

no test coverage detected