Trigger Reference Guide

The "dist_rot_x" Function #


dist_rot_x(dist, [deg]);
Argument Type Description
dist real Horizontal distance from the rotation center point
[deg] real Optional: Angle of rotation in degrees


Returns the X component of a point the given distance away, rotated by the given angle in degrees. (Center point is assumed as 0.)

Supplying an angle is optional. As calculating the sine and cosine of angles is costly to performance, these values are stored in memory for use with further instances of trigonometry functions based on the same angle. If no angle is supplied, the previous angle’s sine and cosine will be used instead. This is highly useful for improving performance when calculating multiple points based on the same rotation.


x = 128 + dist_rot_x(64, image_angle);
y = 128 + dist_rot_y(64);
Last updated on February 13, 2019
Suggest Edit