MCPcopy Index your code
hub / github.com/VolmitSoftware/Adapt / normalize

Method normalize

src/main/java/com/volmit/adapt/util/Vector3d.java:123–130  ·  view source on GitHub ↗

Sets the value of this vector to the normalization of vector v1. @param v1 the un-normalized vector

(Vector3d v1)

Source from the content-addressed store, hash-verified

121 * @param v1 the un-normalized vector
122 */
123 public final void normalize(Vector3d v1) {
124 double norm;
125
126 norm = 1.0 / Math.sqrt(v1.x * v1.x + v1.y * v1.y + v1.z * v1.z);
127 this.x = v1.x * norm;
128 this.y = v1.y * norm;
129 this.z = v1.z * norm;
130 }
131
132
133 /**

Callers 5

onMethod · 0.45
searchForOresMethod · 0.45
getDirectionMethod · 0.45
directionMethod · 0.45
triNormalizeMethod · 0.45

Calls 1

sqrtMethod · 0.80

Tested by

no test coverage detected