====== RotateVector ======
{{tag>math vectors}}
''fixed, fixed RotateVector(fixed x, fixed y, angle angle)''
[[: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 =====
Returns the 2D vector rotated by angle.
===== Examples =====
RotateVector(x, y, angle);
int newX = r1;
int newY = r2;
Rotate a point around the origin
RotateVector(x - originX, y - originY, angle);
int newX = r1 + originX;
int newY = r2 + originY;
Use [[RotatePoint]] instead of the example code above.