Java Double Number Round roundDown(double amt, double digits)

Here you can find the source of roundDown(double amt, double digits)

Description

round Down

License

Apache License

Declaration

public static double roundDown(double amt, double digits) 

Method Source Code

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

public class Main {
    public static double roundDown(double amt, double digits) {
        double powValue = Math.pow(10, digits);
        amt = amt * powValue;//w w w  . ja  va  2s  .  com
        amt = ((int) amt);
        amt = amt / powValue;

        return amt;
    }
}

Related

  1. roundDoubleTo(double val, int pow)
  2. roundDoubleToInt(final double VALUE)
  3. roundDoubleToPlace(double d, int place)
  4. roundDoubleValue(double value)
  5. roundDown(double a)
  6. roundDown(double n)
  7. roundDown(double num)
  8. roundDown(double val, int decimals)
  9. roundDown(double value, double units)