Java Double Number Round roundDouble(double d)

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

Description

round Double

License

Open Source License

Declaration

public static double roundDouble(double d) 

Method Source Code

//package com.java2s;

public class Main {
    public static double roundDouble(double d) {
        int c = 10;
        int temp = (int) ((d * Math.pow(10, c)));
        return (((double) temp) / Math.pow(10, c));
    }//  w w  w  .j a v  a 2  s  .c  o  m
}

Related

  1. roundDecimal(Double value)
  2. roundDecimal(double x, int d)
  3. roundDecimals(double d, int decimalPlaces)
  4. roundDecimals(double x, int decimals)
  5. roundDiv(double a, double b)
  6. roundDouble(double d)
  7. roundDouble(double d, int decimals)
  8. roundDouble(double d, int place)
  9. roundDouble(double d, int places)