UTIL VecToYaw(): Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Created page with '{{stub}} 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 compone…')
 
mNo edit summary
Line 15: Line 15:
float UTIL_VecToYaw (const Vector &vec);
float UTIL_VecToYaw (const Vector &vec);
</source>
</source>
{{wrongtitle|title=UTIL_VecToYaw()}}

Revision as of 15:42, 14 February 2010

Stub

This article or section is a stub. You can help by expanding it.

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);


Template:Wrongtitle