Android Double Round round(double what, int howmuch)

Here you can find the source of round(double what, int howmuch)

Description

round

Declaration

public static double round(double what, int howmuch) 

Method Source Code

//package com.java2s;

public class Main {
    public static double round(double what, int howmuch) {
        return (double) ((int) (what * Math.pow(10, howmuch) + .5))
                / Math.pow(10, howmuch);
    }//  w w  w. j a v a2 s .  c  o m
}

Related

  1. round(double d, int decimalPlace)
  2. round(double value)
  3. round(double d, int decimalPlace)
  4. round(double val, int numberOfDigitsAfterDecimal)
  5. roundTwoDecimals(double d)
  6. round(double number, int decimal)
  7. convertDecimal(double d)
  8. twoDecimalDoubleFormatter(double number)