Angle implements AttributeValue { public static Angle rad(final double rads) { return new Angle(rads, Angle.Unit.RAD); } Angle(final double value, final Unit unit); static Angle deg(final double degs); static Angle grad(final double grads); static Angle rad(final double rads); @Override String toString(); @Override String getValue(); static final Angle NO_ROTATING; static final Angle ROTATE_90; static final Angle ROTATE_180; static final Angle ROTATE_270; }
@Test public void testRad() { final Angle r = Angle.rad(3.14); Assert.assertEquals("3.14rad", r.toString()); }