/** * Show the value of a double with specified number of decimal places * * @param d double value * @param dec_places number of decimal places */ private static void show2(double d, int dec_places) { System.out.println("Format.dfrac(" + d + "," + dec_places + ") == " + Format.dfrac(d, dec_places)); }
/** * Show the value of a double with specified number of decimal places * * @param d double value * @param dec_places number of decimal places */ private static void show2(double d, int dec_places) { System.out.println("Format.dfrac(" + d + "," + dec_places + ") == " + Format.dfrac(d, dec_places)); }
/** * Show the value of a double with specified number of decimal places * * @param d double value * @param dec_places number of decimal places */ private static void show2(double d, int dec_places) { System.out.println("Format.dfrac(" + d + "," + dec_places + ") == " + Format.dfrac(d, dec_places)); }
public static void main(String args[]) { int nlats = 94; GaussianLatitudes glat = new GaussianLatitudes(nlats); for (int i=0; i<nlats; i++) { System.out.print(" lat "+i+" = "+ Format.dfrac( glat.latd[i], 4)); if (i < nlats - 1) System.out.print(" diff = " + (glat.latd[i + 1] - glat.latd[i])); System.out.println(" weight= "+ Format.dfrac( glat.gaussw[i], 6)); } }
public static void main(String args[]) { int nlats = 512; GaussianLatitudes glat = new GaussianLatitudes(nlats); for (int i=0; i<nlats-1; i++) { System.out.print(" lat "+i+" = "+ Format.dfrac( glat.latd[i], 4)); System.out.print(" diff "+i+" = "+ (glat.latd[i+1]-glat.latd[i])); System.out.println(" weight= "+ Format.dfrac( glat.gaussw[i], 6)); } }
public static void main(String args[]) { int nlats = 512; GaussianLatitudes glat = new GaussianLatitudes(nlats); for (int i=0; i<nlats-1; i++) { System.out.print(" lat "+i+" = "+ Format.dfrac( glat.latd[i], 4)); System.out.print(" diff "+i+" = "+ (glat.latd[i+1]-glat.latd[i])); System.out.println(" weight= "+ Format.dfrac( glat.gaussw[i], 6)); } }
public static void main(String args[]) { int nlats = 512; GaussianLatitudes glat = new GaussianLatitudes(nlats); for (int i=0; i<nlats-1; i++) { System.out.print(" lat "+i+" = "+ Format.dfrac( glat.latd[i], 4)); System.out.print(" diff "+i+" = "+ (glat.latd[i+1]-glat.latd[i])); System.out.println(" weight= "+ Format.dfrac( glat.gaussw[i], 6)); } }
/** * Return a String representation of this object. * <pre>lat= [-90.00,90.00] lon= [0.00,360.00</pre> * * @return a String representation of this object. */ public String toString2() { return " lat= [" + Format.dfrac(getLatMin(), 2) + "," + Format.dfrac(getLatMax(), 2) + "] lon= [" + Format.dfrac(getLonMin(), 2) + "," + Format.dfrac(getLonMax(), 2) + "]"; }
/** * Return a String representation of this object. * <pre>lat= [-90.00,90.00] lon= [0.00,360.00</pre> * * @return a String representation of this object. */ public String toString2() { return " lat= [" + Format.dfrac(getLatMin(), 2) + "," + Format.dfrac(getLatMax(), 2) + "] lon= [" + Format.dfrac(getLonMin(), 2) + "," + Format.dfrac(getLonMax(), 2) + "]"; }
/** * Return a String representation of this object. * <pre>lat= [-90.00,90.00] lon= [0.00,360.00</pre> * * @return a String representation of this object. */ public String toString2() { return " lat= [" + Format.dfrac(getLatMin(), 2) + "," + Format.dfrac(getLatMax(), 2) + "] lon= [" + Format.dfrac(getLonMin(), 2) + "," + Format.dfrac(getLonMax(), 2) + "]"; }
@Override public String getDetailInfo() { if (raf == null) return ""; try { Formatter fout = new Formatter(); double size = raf.length() / (1000.0 * 1000.0); fout.format(" raf = %s%n", raf.getLocation()); fout.format(" size= %d (%s Mb)%n%n", raf.length(), Format.dfrac(size, 3)); return fout.toString(); } catch (IOException e) { return e.getMessage(); } }
@Override public String getDetailInfo() { if (raf == null) return ""; try { Formatter fout = new Formatter(); double size = raf.length() / (1000.0 * 1000.0); fout.format(" raf = %s%n", raf.getLocation()); fout.format(" size= %d (%s Mb)%n%n", raf.length(), Format.dfrac(size, 3)); return fout.toString(); } catch (IOException e) { return e.getMessage(); } }
private Element writeBoundingBox(LatLonRect bb) { Element bbElem = new Element("LatLonBox"); bbElem.addContent(new Element("west").addContent(ucar.unidata.util.Format.dfrac(bb.getLonMin(), 4))); bbElem.addContent(new Element("east").addContent(ucar.unidata.util.Format.dfrac(bb.getLonMax(), 4))); bbElem.addContent(new Element("south").addContent(ucar.unidata.util.Format.dfrac(bb.getLatMin(), 4))); bbElem.addContent(new Element("north").addContent(ucar.unidata.util.Format.dfrac(bb.getLatMax(), 4))); return bbElem; }
private Element writeBoundingBox(LatLonRect bb) { Element bbElem = new Element("LatLonBox"); bbElem.addContent(new Element("west").addContent(ucar.unidata.util.Format.dfrac(bb.getLonMin(), 4))); bbElem.addContent(new Element("east").addContent(ucar.unidata.util.Format.dfrac(bb.getLonMax(), 4))); bbElem.addContent(new Element("south").addContent(ucar.unidata.util.Format.dfrac(bb.getLatMin(), 4))); bbElem.addContent(new Element("north").addContent(ucar.unidata.util.Format.dfrac(bb.getLatMax(), 4))); return bbElem; }
private Element writeBoundingBox(LatLonRect bb) { Element bbElem = new Element("LatLonBox"); bbElem.addContent(new Element("west").addContent(ucar.unidata.util.Format.dfrac(bb.getLonMin(), 4))); bbElem.addContent(new Element("east").addContent(ucar.unidata.util.Format.dfrac(bb.getLonMax(), 4))); bbElem.addContent(new Element("south").addContent(ucar.unidata.util.Format.dfrac(bb.getLatMin(), 4))); bbElem.addContent(new Element("north").addContent(ucar.unidata.util.Format.dfrac(bb.getLatMax(), 4))); return bbElem; }
private Element writeBoundingBox(LatLonRect bb) { Element bbElem = new Element("LatLonBox"); // from KML bbElem.addContent(new Element("west").addContent(ucar.unidata.util.Format.dfrac(bb.getLonMin(), 6))); bbElem.addContent(new Element("east").addContent(ucar.unidata.util.Format.dfrac(bb.getLonMax(), 6))); bbElem.addContent(new Element("south").addContent(ucar.unidata.util.Format.dfrac(bb.getLatMin(), 6))); bbElem.addContent(new Element("north").addContent(ucar.unidata.util.Format.dfrac(bb.getLatMax(), 6))); return bbElem; }
private Element writeBoundingBox(LatLonRect bb) { Element bbElem = new Element("LatLonBox"); // from KML bbElem.addContent(new Element("west").addContent(ucar.unidata.util.Format.dfrac(bb.getLonMin(), 6))); bbElem.addContent(new Element("east").addContent(ucar.unidata.util.Format.dfrac(bb.getLonMax(), 6))); bbElem.addContent(new Element("south").addContent(ucar.unidata.util.Format.dfrac(bb.getLatMin(), 6))); bbElem.addContent(new Element("north").addContent(ucar.unidata.util.Format.dfrac(bb.getLatMax(), 6))); return bbElem; }