MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / asEulerF

Method asEulerF

Engine/source/math/mRotation.cpp:201–227  ·  view source on GitHub ↗

========================================================

Source from the content-addressed store, hash-verified

199
200//========================================================
201EulerF RotationF::asEulerF(UnitFormat _format) const
202{
203 if (mRotationType == Euler)
204 {
205 if (_format == Degrees)
206 {
207 return EulerF(mRadToDeg(x), mRadToDeg(y), mRadToDeg(z));
208 }
209 else
210 {
211 return EulerF(x, y, z);
212 }
213 }
214 else
215 {
216 EulerF returnEuler = asMatrixF().toEuler();
217
218 if (_format == Degrees)
219 {
220 returnEuler.x = mRadToDeg(returnEuler.x);
221 returnEuler.y = mRadToDeg(returnEuler.y);
222 returnEuler.z = mRadToDeg(returnEuler.z);
223 }
224
225 return returnEuler;
226 }
227}
228
229AngAxisF RotationF::asAxisAngle(UnitFormat format) const
230{

Callers 3

renderFrameFunction · 0.80
mRotation.cppFile · 0.80
ConsoleGetTypeFunction · 0.80

Calls 2

mRadToDegFunction · 0.85
toEulerMethod · 0.80

Tested by

no test coverage detected