RotateVector

fixed, fixed RotateVector(fixed x, fixed y, angle angle)

angle - a fixed-point ZDoom angle (not degrees or radians)

This function returns multiple values.

Description

Returns the 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.