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

Method normalize

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

342 * @return the same vector
343 */
344 @NotNull
345 public Vector normalize() {
346 double length = length();
347
348 x /= length;
349 y /= length;
350 z /= length;
351
352 return this;
353 }
354
355 /**
356 * Zero this vector's components.

Callers 14

getDirectionMethod · 0.95
rayTraceEntitiesMethod · 0.80
rayTraceBlocksMethod · 0.80
rayTraceMethod · 0.80
rayTraceMethod · 0.80
rotateAroundAxisMethod · 0.80
fillNormalMethod · 0.80
processVerticesMethod · 0.80
makeQuadMethod · 0.80
bakeMethod · 0.80
getNormalMethod · 0.80
processQuadMethod · 0.80

Calls 1

lengthMethod · 0.95

Tested by

no test coverage detected