These two functions are used to rotate a given point from its current position around a defined center in any given angle.
SYNTAX:
xRot% = RotPointX% (xPos%, yPos%, ang!, xCen%, yCen%) yRot% = RotPointY% (xPos%, yPos%, ang!, xCen%, yCen%)
INPUTS:
xPos%, yPos% (INTEGERs)
- The X and Y position of the point to rotate.
ang! (SINGLE)
- The desired rotation angle.
xCen%, yCen% (INTEGERs)
- The X and Y position of the rotation center point.
RESULT:
xRot% (INTEGER)
- This will be returned by the function RotPointX() and represents the X position of the rotated point.
yRot% (INTEGER)
- This will be returned by the function RotPointY() and represents the Y position of the rotated point.