====== VectorToAngles ======
{{tag>math vectors}}
''angle, angle VectorToAngles(fixed x, fixed y, fixed z)''
[[:types|angle - a fixed-point]] [[zdoom>Definitions#Fixed_point_angles|ZDoom angle]] [[:types|(not degrees or radians)]]
[[:Multiple_return_values|This function returns multiple values.]]
===== Description =====
Converts a 3D vector to a pair of angles (yaw and pitch).
===== Examples =====
Make the player look along the vector:
VectorToAngles(1.0, 2.0, 3.0);
int angle = r1;
int pitch = r2;
SetActorAngle(tid, angle);
SetActorPitch(tid, -pitch); // Note that actor pitch is inverted in ZDoom.
Use [[LookAtPoint]] instead of the example code above.