public void ShouldRotateCorrectly() { var initial = new GridPoint(10, 20); initial.RotateAroundOrigin(4).Should().Be(initial); initial.RotateAroundOrigin(-4).Should().Be(initial); initial.RotateAroundOrigin(2).Should().Be(new GridPoint(-10, -20)); }
// public int Facing; private void ApplyRotation(int degrees) { WaypointPosition = WaypointPosition.RotateAroundOrigin(degrees / 90); }