The "point_rot_x" Function
point_rot_x(x, y, [deg]);
|x||real||Horizontal distance from the rotation center point|
|y||real||Vertical 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.
Example: x = 128 + point_rot_x(64, 64, image_angle); y = 128 + point_rot_y(64, 64);