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

Method length

src/main/java/org/bukkit/util/Vector.java:162–164  ·  view source on GitHub ↗

Gets the magnitude of the vector, 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 vector's magnitude. NaN will be returned if the inner result of the sqrt() function overflows, which will be

()

Source from the content-addressed store, hash-verified

160 * @return the magnitude
161 */
162 public double length() {
163 return Math.sqrt(NumberConversions.square(x) + NumberConversions.square(y) + NumberConversions.square(z));
164 }
165
166 /**
167 * Gets the magnitude of the vector squared.

Callers 15

angleMethod · 0.95
normalizeMethod · 0.95
buildCommandMethod · 0.45
tabCompleteMethod · 0.45
registerServerAliasesMethod · 0.45
testPermissionMethod · 0.45
testPermissionSilentMethod · 0.45
executeMethod · 0.45
tabCompleteMethod · 0.45

Calls 1

squareMethod · 0.95

Tested by

no test coverage detected