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

Method normalize

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

Converts this vector to a unit vector (a vector with length of 1). @return the same vector

()

Source from the content-addressed store, hash-verified

304 * @return the same vector
305 */
306 public Vector normalize() {
307 double length = length();
308
309 x /= length;
310 y /= length;
311 z /= length;
312
313 return this;
314 }
315
316 /**
317 * Zero this vector's components.

Callers

nothing calls this directly

Calls 1

lengthMethod · 0.95

Tested by

no test coverage detected