MCPcopy Create free account
hub / github.com/Teneted/Tenet / distance

Method distance

src/main/java/org/bukkit/Location.java:482–484  ·  view source on GitHub ↗

Get the distance between this location and another. The value of this method is not cached and uses a costly square-root function, so do not repeatedly call this method to get the location's magnitude. NaN will be returned if the inner result of the sqrt() function overflows, which will be caused if

(@NotNull Location o)

Source from the content-addressed store, hash-verified

480 * @see Vector
481 */
482 public double distance(@NotNull Location o) {
483 return Math.sqrt(distanceSquared(o));
484 }
485
486 /**
487 * Get the squared distance between this location and another.

Callers

nothing calls this directly

Calls 1

distanceSquaredMethod · 0.95

Tested by

no test coverage detected