@Test public void testDwidth() { double num = 1.2345; assertThat(Format.d(num, 3, 2)).isEqualTo("1.23"); assertThat(Format.d(num, 3, 3)).isEqualTo("1.23"); assertThat(Format.d(num, 3, 4)).isEqualTo("1.23"); assertThat(Format.d(num, 3, 5)).isEqualTo(" 1.23"); assertThat(Format.d(num, 3, 6)).isEqualTo(" 1.23"); }
public static String d(double d, int min_sigfig) { return formatDouble(d, min_sigfig, -1).trim(); }
Format { public static String d(double d, int min_sigfig) { return formatDouble(d, min_sigfig, -1).trim(); } }
Format { public static String d(double d, int min_sigfig) { return formatDouble(d, min_sigfig, -1).trim(); }  }
Format { public static String d(double d, int min_sigfig) { return formatDouble(d, min_sigfig, -1).trim(); }  static void tab(StringBuilder sbuff, int tabStop, boolean alwaysOne); static String s(String s, int width); static String pad(String s, int width, boolean rightJustify); static String i(int v, int width); static String l(long v, int width); static String d(double d, int min_sigfig); static String d(double d, int min_sigfig, int width); static String dfrac(double d, int fixed_decimals); static String formatDouble(double d, int min_sigFigs, int fixed_decimals); static String formatByteSize(double size); }
Format { public static String d(double d, int min_sigfig) { return formatDouble(d, min_sigfig, -1).trim(); }  static void tab(StringBuilder sbuff, int tabStop, boolean alwaysOne); static String s(String s, int width); static String pad(String s, int width, boolean rightJustify); static String i(int v, int width); static String l(long v, int width); static String d(double d, int min_sigfig); static String d(double d, int min_sigfig, int width); static String dfrac(double d, int fixed_decimals); static String formatDouble(double d, int min_sigFigs, int fixed_decimals); static String formatByteSize(double size);  }