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

Method distance

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

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

(Vec2 v)

Source from the content-addressed store, hash-verified

581 * @return the euclidean distance
582 */
583 public double distance(Vec2 v) {
584 return Math.sqrt((v.x - x) * (v.x - x) + (v.y - y) * (v.y - y));
585 }
586
587 /**
588 * Return the squared distance between <code>this</code> and <code>v</code>.

Callers 15

hitTestMethod · 0.95
arcMethod · 0.95
arcMethod · 0.95
javaShapeToFLineFlatMethod · 0.95
javaShapeToFLineMethod · 0.95
d3.min.jsFile · 0.45
setTranslationMethod · 0.45
setScaleMethod · 0.45
commitMethod · 0.45
commitMethod · 0.45
commitMethod · 0.45
connectMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected