MCPcopy Create free account
hub / github.com/EricLengyel/Terathon-Math-Library / GetEulerAngles

Method GetEulerAngles

TSMatrix4D.cpp:566–590  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

564}
565
566void Transform3D::GetEulerAngles(float *x, float *y, float *z) const
567{
568 float sy = m02;
569 if (sy < 1.0F)
570 {
571 if (sy > -1.0F)
572 {
573 *x = -Arctan(m12, m22);
574 *y = Arcsin(sy);
575 *z = -Arctan(m01, m00);
576 }
577 else
578 {
579 *x = 0.0F;
580 *y = -Math::tau_over_4;
581 *z = Arctan(m10, m11);
582 }
583 }
584 else
585 {
586 *x = 0.0F;
587 *y = Math::tau_over_4;
588 *z = Arctan(m10, m11);
589 }
590}
591
592Transform3D& Transform3D::SetEulerAngles(float x, float y, float z)
593{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected