133134135136137138139
case SOUTH: vec.y++; return; case WEST: vec.x--; return; default: break; } throw new InvalidParameterException("Unknown direction, should be NORTH, EAST, SOUTH or WEST."); }
153154155156157158159
case SOUTH: return NORTH; case WEST: return EAST; default: break; } throw new InvalidParameterException("Unknown direction, should be NORTH, EAST, SOUTH or WEST."); }
182183184185186187188189190191
} else if (from.x > to.x) { direction = WEST; } } if (direction < 0) { throw new InvalidParameterException("Specified integer vectors must lie in the same line or in the same column."); } return direction; }