UTIL VecToYaw(): Difference between revisions
Jump to navigation
Jump to search
Psycommando (talk | contribs) mNo edit summary |
mNo edit summary |
||
(2 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
{{stub}} | {{stub}}{{DISPLAYTITLE:UTIL_VecToYaw()}} | ||
Is an utility function used to determine a Yaw value from a [[Vector]]. It is defined in ''..\game\shared\util_shared.cpp'' | Is an utility function used to determine a Yaw value from a [[Vector]]. It is defined in ''..\game\shared\util_shared.cpp'' | ||
Line 15: | Line 15: | ||
float UTIL_VecToYaw (const Vector &vec); | float UTIL_VecToYaw (const Vector &vec); | ||
</source> | </source> | ||
[[Category:Functions]] | |||
Latest revision as of 00:19, 5 December 2011
Is an utility function used to determine a Yaw value from a Vector. It is defined in ..\game\shared\util_shared.cpp
It does an atan2( y, x ) on the components of the Vector passed in parameter, converts it in degrees and ensure it's between 0-360 degrees ( and not between 180 to -180 ).
Declaration
Declared in ..\game\shared\util_shared.h
//-----------------------------------------------------------------------------
// Pitch + yaw
//-----------------------------------------------------------------------------
float UTIL_VecToYaw (const Vector &vec);