mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-12-06 03:07:19 +00:00
Fix getLongestDelta bug reported by lmctruck.
This commit is contained in:
1 parent
f58c4784fa
commit
81ddd36662
1 file changed
+2
-2
@@ -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