MCPcopy Create free account
hub / github.com/TombEngine/TombEngine / phd_GetMatrixAngles

Function phd_GetMatrixAngles

TombEngine/Objects/Generic/Object/rope.cpp:141–149  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

139 }
140
141 void phd_GetMatrixAngles(int* matrix, short* angle)
142 {
143 angle[0] = phd_atan(sqrt(SQUARE(matrix[M22]) + SQUARE(matrix[M02])), matrix[M12]);
144 if (matrix[M12] >= 0 && angle[0] > 0 || matrix[M12] < 0 && angle[0] < 0)
145 angle[0] = -angle[0];
146
147 angle[1] = phd_atan(matrix[M22], matrix[M02]);
148 angle[2] = phd_atan(matrix[M00] * phd_cos(angle[1]) - matrix[M20] * phd_sin(angle[1]), matrix[M21] * phd_sin(angle[1]) - matrix[M01] * phd_cos(angle[1]));
149 }
150
151 void RopeControl(short itemNumber)
152 {

Callers 1

DelAlignLaraToRopeFunction · 0.85

Calls 3

phd_atanFunction · 0.85
phd_cosFunction · 0.85
phd_sinFunction · 0.85

Tested by

no test coverage detected