code: function getDirection(coord1, coord2) {
    if (Math.abs(coord1.x - coord2.x) >= Math.abs(coord1.y - coord2.y)) {
      return getTheDirection(
        coord1.x, coord2.x, Direction.LEFT,
        Direction.RIGHT, Direction.NONE,
      );
    }
  
    return getTheDirection(
      coord1.y, coord2.y, Direction.UP,
      Direction.DOWN, Direction.NONE,
    );
  }
docs: angle to direction define.
  @param {Coordinate} coord1 The starting coordinate.
  @param {Coordinate} coord2 The ending coordinate.
  @return {string} Direction constant.