UTIL VecToYaw(): Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
({{confirm}} function return value)
Tag: Reverted
(duplicate page)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
{{stub}}{{DISPLAYTITLE:UTIL_VecToYaw()}}
{{stub}}{{DISPLAYTITLE:UTIL_VecToYaw()}}{{Mergeto|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''


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 ).{{confirm}}
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==
==Declaration==

Latest revision as of 08:06, 28 November 2025

Stub

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

Merge-arrows.png
It has been suggested that this article or section be merged into UTIL_VecToYaw. (Discuss)

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