MCPcopy Create free account
hub / github.com/PaperMC/Paper / length

Method length

paper-api/src/main/java/org/bukkit/Location.java:532–534  ·  view source on GitHub ↗

Gets the magnitude of the location, defined as sqrt(x^2+y^2+z^2). 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 wil

()

Source from the content-addressed store, hash-verified

530 * @see Vector
531 */
532 public double length() {
533 return Math.sqrt(NumberConversions.square(x) + NumberConversions.square(y) + NumberConversions.square(z));
534 }
535
536 /**
537 * Gets the magnitude of the location squared. Not world-aware and

Callers 15

isAnonymousMethod · 0.45
removeHomeDirectoryMethod · 0.45
manifestMethod · 0.45
matchMaterialMethod · 0.45
getByCharMethod · 0.45
getLastColorsMethod · 0.45
validateMethod · 0.45
fromStringMethod · 0.45
NamespacedTagMethod · 0.45
ProfilePropertyMethod · 0.45
formatApiNameMethod · 0.45

Calls 1

squareMethod · 0.95

Tested by 5

isAnonymousMethod · 0.36
removeHomeDirectoryMethod · 0.36
randomizeCaseMethod · 0.36
dataMethod · 0.36
removeHomeDirectoryMethod · 0.36