mirror of
https://github.com/ProjectSWGCore/Holocore.git
synced 2026-10-13 03:13:09 -04:00
Removed unnecessary variable declaration from distanceTo in Location
This commit is contained in:
@@ -285,10 +285,6 @@ public class Location implements Encodable, Serializable {
|
||||
* @return the distance between {@code this} and destination, which is ALWAYS positive.
|
||||
*/
|
||||
public double distanceTo(Location destination) {
|
||||
double deltaX = destination.getX() - getX();
|
||||
double deltaY = destination.getY() - getY();
|
||||
double deltaZ = destination.getZ() - getZ();
|
||||
|
||||
return Math.sqrt(square(deltaX) + square(deltaY) + square(deltaZ));
|
||||
return Math.sqrt(square(destination.getX() - getX()) + square(destination.getY() - getY()) + square(destination.getZ() - getZ()));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user