rotate

fun rotate(dirRotate: DirRotate): DirXY

Rotates the current direction based on the given DirRotate direction.

Return

The new DirXY direction after rotation.

Parameters

dirRotate

The direction to rotate (DirRotate.CLOCKWISE or DirRotate.COUNTERCLOCKWISE).