MCPcopy Create free account
hub / github.com/GarageGames/Torque3D / getAnglesFromVector

Function getAnglesFromVector

Engine/source/math/mathUtils.cpp:332–344  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

330//-----------------------------------------------------------------------------
331
332void getAnglesFromVector( const VectorF &vec, F32 &yawAng, F32 &pitchAng )
333{
334 yawAng = mAtan2( vec.x, vec.y );
335 if( yawAng < 0.0f )
336 yawAng += M_2PI_F;
337
338 if( mFabs(vec.x) > mFabs(vec.y) )
339 pitchAng = mAtan2( mFabs(vec.z), mFabs(vec.x) );
340 else
341 pitchAng = mAtan2( mFabs(vec.z), mFabs(vec.y) );
342 if( vec.z < 0.0f )
343 pitchAng = -pitchAng;
344}
345
346//-----------------------------------------------------------------------------
347

Callers 9

_getFogColorMethod · 0.85
processTickMethod · 0.85
interpolateTickMethod · 0.85
setEditOrbitModeMethod · 0.85
setEditOrbitPointMethod · 0.85
lookAtMethod · 0.85
autoFitRadiusMethod · 0.85
updateMoveMethod · 0.85
_trackTargetMethod · 0.85

Calls 2

mAtan2Function · 0.85
mFabsFunction · 0.85

Tested by

no test coverage detected