anchor.diff:      });
       test("Rotate 45 angles diagonal directions", () {
         directionSystem.rotateDirectionsAngles(45);
  -      testDirection(directionSystem.upLeftDirection, -1, 0);
  -      testDirection(directionSystem.upRightDirection, 1, 0);
  -      testDirection(directionSystem.downLeftDirection, 0, -1);
  -      testDirection(directionSystem.downRightDirection, 0, 1);
  +      testDirectionRange(directionSystem.upLeftDirection, -0.0001, 0.0001, -1, -1);
  +      testDirectionRange(directionSystem.upRightDirection, 1, 1, -0.0001, 0.0001);
  +      testDirectionRange(directionSystem.downLeftDirection, -1, -1, -0.0001, 0.0001);
  +      testDirectionRange(directionSystem.downRightDirection, -0.0001, 0.0001, 1, 1);
  +    });
  +    test("Rotate PI/4 radians diagonal directions", () {
  +      directionSystem.rotateDirectionsRadians(PI/4);
  +      testDirectionRange(directionSystem.upLeftDirection, -0.0001, 0.0001, -1, -1);
  +      testDirectionRange(directionSystem.upRightDirection, 1, 1, -0.0001, 0.0001);
  +      testDirectionRange(directionSystem.downLeftDirection, -1, -1, -0.0001, 0.0001);
  +      testDirectionRange(directionSystem.downRightDirection, -0.0001, 0.0001, 1, 1);
       });
       test("Rotate 90 angles main directions", () {
         directionSystem.rotateDirectionsAngles(90);
  -      testDirection(directionSystem.upDirection, 1, 0);
  -      testDirection(directionSystem.downDirection, -1, 0);
  -      testDirection(directionSystem.leftDirection, 0, -1);
  -      testDirection(directionSystem.rightDirection, 0, 1);
  -    });
  -  });
  -
  -}
  +      testDirectionRange(directionSystem.upDirection, 1, 1, -0.0001, 0.0001);
  +      testDirectionRange(directionSystem.downDirection, -1, -1, -0.0001, 0.0001);
  +      testDirectionRange(directionSystem.leftDirection, -0.0001, 0.0001, -1, -1);
  +      testDirectionRange(directionSystem.rightDirection, -0.0001, 0.0001, 1, 1);
  +    });
  +    test("Rotate PI/2 radians main direction", () {
  +      directionSystem.rotateDirectionsRadians(PI/2);
  +      testDirectionRange(directionSystem.upDirection, 1, 1, -0.0001, 0.0001);
  +      testDirectionRange(directionSystem.downDirection, -1, -1, -0.0001, 0.0001);
  +      testDirectionRange(directionSystem.leftDirection, -0.0001, 0.0001, -1, -1);
  +      testDirectionRange(directionSystem.rightDirection, -0.0001, 0.0001, 1, 1);
  +    });
  +  });
  +
  +}
  +
  +//=============================================================================
   
   void testDirection(direction, x, y) {
     expect(direction.x, equals(x));
  
positive.code:       directionSystem = null;
      });
      test("Get main directions", () {
        testGetDirections(directionSystem, Direction.MAIN_DIRECTIONS, [{
            "x": 0,
            "y": -1
          }, {
            "x": 0,
            "y": 1
          }, {
            "x": -1,
            "y": 0
          }, {
            "x": 1,
            "y": 0
          }]);
      });
      test("Get diagonal directions", () {
        testGetDirections(directionSystem, Direction.DIAGONAL_DIRECTIONS, [{
            "x": -expectedDiagonalValue,
            "y": -expectedDiagonalValue
          }, {
            "x": expectedDiagonalValue,
            "y": -expectedDiagonalValue
          }, {
            "x": -expectedDiagonalValue,
            "y": expectedDiagonalValue
          }, {
            "x": expectedDiagonalValue,
            "y": expectedDiagonalValue
          }]);
      });
    });
  
  
negative.code:   for (int i = 0; i < directions.length; i++) {
      testDirection(directionSystem.getDirection(directions[i]), expectedDirections[i]["x"], expectedDirections[i]["y"]);
    }
  }