ACSUtils Wiki

An ACS library for ZDoom-based ports

User Tools

Site Tools


This is an old revision of the document!

Table of Contents


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

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


Returns the vector rotated by angle.


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.
functions/rotatevector.1489766473.txt.gz · Last modified: 2017/03/17 18:01 by korshun