@Test public void ofVec() { assertEquals(0, Angle.ofVec(Vector2.fromAngle(0)).asRad(), ACCURACY); assertEquals(-1.982297, Angle.ofVec(Vector2.fromAngle(42)).asRad(), ACCURACY); assertEquals(Math.PI / 2, Angle.ofVec(Vector2.fromAngle(Math.PI / 2)).asRad(), ACCURACY); }
public static Angle ofVec(IVector2 vector) { return new Angle(vector.getAngle()); }
Angle extends AAngularMeasure implements IAngle { public static Angle ofVec(IVector2 vector) { return new Angle(vector.getAngle()); } }
Angle extends AAngularMeasure implements IAngle { public static Angle ofVec(IVector2 vector) { return new Angle(vector.getAngle()); } private  Angle(); private  Angle(double rad); }
Angle extends AAngularMeasure implements IAngle { public static Angle ofVec(IVector2 vector) { return new Angle(vector.getAngle()); } private  Angle(); private  Angle(double rad); static Angle zero(); static Angle ofRad(double rad); static Angle ofDeg(double deg); static Angle ofRotation(double turns); static Angle ofVec(IVector2 vector); static Angle ofAngularMeasure(IAngularMeasure angularMeasure); @Override IAngle add(final IAngularMeasure angle); @Override IAngle add(final double angle); @Override IAngle subtract(final IAngularMeasure angle); @Override IAngle subtract(final double angle); @Override IAngle multiply(final double factor); }
Angle extends AAngularMeasure implements IAngle { public static Angle ofVec(IVector2 vector) { return new Angle(vector.getAngle()); } private  Angle(); private  Angle(double rad); static Angle zero(); static Angle ofRad(double rad); static Angle ofDeg(double deg); static Angle ofRotation(double turns); static Angle ofVec(IVector2 vector); static Angle ofAngularMeasure(IAngularMeasure angularMeasure); @Override IAngle add(final IAngularMeasure angle); @Override IAngle add(final double angle); @Override IAngle subtract(final IAngularMeasure angle); @Override IAngle subtract(final double angle); @Override IAngle multiply(final double factor);  }