Java Double Number Format formatDouble(double d)

Here you can find the source of formatDouble(double d)

Description

format Double

License

LGPL

Declaration

public static double formatDouble(double d) 

Method Source Code

//package com.java2s;
//License from project: LGPL 

public class Main {
    public static double formatDouble(double d) {
        return (double) Math.round(d * 100) / 100;
    }//from   w ww .j  av a 2 s.  c  om
}

Related

  1. format(double value, int decimalPlaces)
  2. format(double value, int digits)
  3. format(final double power)
  4. formatDouble(double d)
  5. formatDouble(double d)
  6. formatDouble(double d, int n)
  7. formatDouble(double d, int n)
  8. formatDouble(double d, int n, String pad)
  9. formatDouble(double d, int precision)