### Question:
MathExt { public static String rounds(double a) { return String.valueOf(Math.round(a * 100) / 100d); }  static boolean equalsDouble(double a, double b); static boolean equalsDouble(double a, double b, double precision); static double parseDoubleAggressive(String s); static double[] parseDoubleValues(String s, String separator); static double round(double a, int sigDigits); static String rounds(double a); static String rounds(double a, int sigDigits); final static double defaultPrecision; }### Answer:
@Test public void testRoundsDouble() throws Exception { String actual = MathExt.rounds(1.1234567); assertEquals("1.12", actual); }
@Test public void testRoundsDouble2() throws Exception { String actual = MathExt.rounds(1.10); assertEquals("1.1", actual); }
@Test public void testRoundsDoubleInt() throws Exception { String actual = MathExt.rounds(1.1234567, 3); assertEquals("1.123", actual); }
@Test public void testRoundsDoubleInt2() throws Exception { String actual = MathExt.rounds(1.66666666666666, 6); assertEquals("1.666667", actual); }
@Test public void testRoundsDoubleInt3() throws Exception { String actual = MathExt.rounds(15030.5, -3); assertEquals("15000.0", actual); }