MCPcopy Create free account
hub / github.com/Bukkit/Bukkit / length

Method length

src/main/java/org/bukkit/util/Vector.java:154–156  ·  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

152 * @return the magnitude
153 */
154 public double length() {
155 return Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2) + Math.pow(z, 2));
156 }
157
158 /**
159 * Gets the magnitude of the vector squared.

Callers 15

angleMethod · 0.95
normalizeMethod · 0.95
registerServerAliasesMethod · 0.45
testPermissionMethod · 0.45
executeMethod · 0.45
executeMethod · 0.45
executeMethod · 0.45
getAuthorsMethod · 0.45
getPluginListMethod · 0.45
executeMethod · 0.45
setMethod · 0.45
getMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected