rotate

fun rotate(dirRotate: DirRotate): Dir8

Rotates the current direction based on the given DirRotate direction.

Return

The new Dir8 direction after rotation.

Parameters

dirRotate

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