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