MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / normalize

Method normalize

src/main/java/field/linalg/Vec2.java:602–607  ·  view source on GitHub ↗

Normalize this vector. @return this

()

Source from the content-addressed store, hash-verified

600 * @return this
601 */
602 public Vec2 normalize() {
603 double length = Math.sqrt((x * x) + (y * y));
604 x /= length;
605 y /= length;
606 return this;
607 }
608
609 /**
610 * Normalize this vector and store the result in <code>dest</code>.

Callers 15

chordOverMethod · 0.95
searchcursor.jsFile · 0.45
PositionMethod · 0.45
applyDragMethod · 0.45
arcMethod · 0.45
arcMethod · 0.45
arcMethod · 0.45
limitVelocityMethod · 0.45
planarRotateMethod · 0.45
planarRotateMethod · 0.45
propagateMethod · 0.45
safeNormalizeFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected