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

Method distanceSquared

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

Return the squared distance between this and v . @param v the other vector @return the euclidean distance

(Vec2 v)

Source from the content-addressed store, hash-verified

591 * @return the euclidean distance
592 */
593 public double distanceSquared(Vec2 v) {
594 return ((v.x - x) * (v.x - x) + (v.y - y) * (v.y - y));
595 }
596
597 /**
598 * Normalize this vector.

Callers 4

hitMethod · 0.95
mainMethod · 0.45
propagateMethod · 0.45
distanceToDataMethod · 0.45

Calls

no outgoing calls

Tested by 1

hitMethod · 0.76