The "point_rot_prefetch" Function
|deg||real||Angle to calculate sine and cosine, in degrees|
Pre-calculates the sine and cosine of an angle in degrees, which can then be used by point_rot_x and point_rot_y (or other variants) without re-calculating. This is highly useful for improving performance when calculating multiple points based on the same rotation.
Note that setting an angle in point_rot_x and point_rot_y will override this script’s calculations with a new sine and cosine. For the same reason, running this script is not necessary so long as the first instance of point_rot_x or point_rot_y is supplied with an angle instead. However, this script can still be quite useful for calculating an angle in a different event than the event in which point_rot_x or point_rot_y is run.
Example: point_rot_prefetch(90); x = point_rot_x(5, 10); y = point_rot_y(5, 10);