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

Method angle

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

Return the angle between this vector and the supplied vector. @param v the other vector @return the angle, in radians

(Vec2 v)

Source from the content-addressed store, hash-verified

549 * @return the angle, in radians
550 */
551 public double angle(Vec2 v) {
552 double dot = x * v.x + y * v.y;
553 double det = x * v.y - y * v.x;
554 return Math.atan2(det, dot);
555 }
556
557 /**
558 * Return the length of this vector.

Callers 8

d3.min.jsFile · 0.45
raphael-min.jsFile · 0.45
__sub__Method · 0.45
__rsub__Method · 0.45
__add__Method · 0.45
__radd__Method · 0.45
__mul__Method · 0.45
__rmul__Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected