/** * Double value formatting with minimum number of significant figures in a minimum width. * This will try to do a reasonable job of getting * a representation that has min_sigfig significant figures in minimum width. * * @param d the number to format. * @param min_sigfig minimum number of significant figures * @return string representation */ public static String d(double d, int min_sigfig) { return formatDouble(d, min_sigfig, -1).trim(); }
/** * Double value formatting with minimum number of significant figures in a minimum width. * This will try to do a reasonable job of getting * a representation that has min_sigfig significant figures in minimum width. * * @param d the number to format. * @param min_sigfig minimum number of significant figures * @return string representation */ public static String d(double d, int min_sigfig) { return formatDouble(d, min_sigfig, -1).trim(); }
/** * Double value formatting with minimum number of significant figures in a minimum width. * This will try to do a reasonable job of getting * a representation that has min_sigfig significant figures in minimum width. * * @param d the number to format. * @param min_sigfig minimum number of significant figures * @return string representation */ public static String d(double d, int min_sigfig) { return formatDouble(d, min_sigfig, -1).trim(); }
/** * Double value formatting with minimum number of significant figures in a minimum width. * This will try to do a reasonable job of getting * a representation that has min_sigfig significant figures in minimum width. * * @param d the number to format. * @param min_sigfig minimum number of significant figures * @return string representation */ public static String d(double d, int min_sigfig) { return formatDouble(d, min_sigfig, -1).trim(); }
/** * Double value formatting with fixed number of digits to the right of the decimal point. * * @param d the number to format. * @param fixed_decimals number of digits to the right of the decimal point * @return string representation, with specified number of decimal places */ public static String dfrac(double d, int fixed_decimals) { return formatDouble(d, 100, fixed_decimals).trim(); //String s = Double.toString( d); //s = sigfigFix( s, 100, num_dec); //return s.trim(); }
/** * Double value formatting with fixed number of digits to the right of the decimal point. * * @param d the number to format. * @param fixed_decimals number of digits to the right of the decimal point * @return string representation, with specified number of decimal places */ public static String dfrac(double d, int fixed_decimals) { return formatDouble(d, 100, fixed_decimals).trim(); //String s = Double.toString( d); //s = sigfigFix( s, 100, num_dec); //return s.trim(); }
/** * Double value formatting with fixed number of digits to the right of the decimal point. * * @param d the number to format. * @param fixed_decimals number of digits to the right of the decimal point * @return string representation, with specified number of decimal places */ public static String dfrac(double d, int fixed_decimals) { return formatDouble(d, 100, fixed_decimals).trim(); //String s = Double.toString( d); //s = sigfigFix( s, 100, num_dec); //return s.trim(); }
/** * Double value formatting with fixed number of digits to the right of the decimal point. * * @param d the number to format. * @param fixed_decimals number of digits to the right of the decimal point * @return string representation, with specified number of decimal places */ public static String dfrac(double d, int fixed_decimals) { return formatDouble(d, 100, fixed_decimals).trim(); //String s = Double.toString( d); //s = sigfigFix( s, 100, num_dec); //return s.trim(); }
void showLatLonNormal(double lon, double center) { System.out.println( Format.formatDouble(lon, 8, 5)+ " => "+ Format.formatDouble(LatLonPointImpl.lonNormal( lon, center), 8, 5)); }