mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-07-03 08:39:11 +00:00
Fix getLongestDelta bug reported by lmctruck.
This commit is contained in:
@@ -160,8 +160,8 @@ public final class Position {
|
||||
* @return The longest horizontal or vertical delta.
|
||||
*/
|
||||
public int getLongestDelta(Position other) {
|
||||
int deltaX = x - other.x;
|
||||
int deltaY = y - other.y;
|
||||
int deltaX = Math.abs(x - other.x);
|
||||
int deltaY = Math.abs(y - other.y);
|
||||
return Math.max(deltaX, deltaY);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user