Math-Get Vector Angle

From Vectorlab
Jump to: navigation, search


Returns the angle of a vector. You need to load the routine M_CheckAng360 before this. By Orso B. Schmid


{ Orso ***************************** }
{ returns the angle of a vector }
FUNCTION M_GetVecAngle(vec: VECTOR): REAL;
	BEGIN
		vec.Z := 0;
		M_GetVecAngle := M_CheckAng360(Vec2Ang(vec));
	END;