Java Double Number Round roundDown(double num)

Here you can find the source of roundDown(double num)

Description

round Down

License

Apache License

Declaration

public static double roundDown(double num) 

Method Source Code

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

public class Main {

    public static double roundDown(double num) {
        return Double.valueOf(String.format("%.2f", num));
        // return new BigDecimal(num).setScale(2,
        // BigDecimal.ROUND_HALF_UP).doubleValue();
    }//w  w  w  .  ja v  a2  s.c o  m
}

Related

  1. roundDoubleToPlace(double d, int place)
  2. roundDoubleValue(double value)
  3. roundDown(double a)
  4. roundDown(double amt, double digits)
  5. roundDown(double n)
  6. roundDown(double val, int decimals)
  7. roundDown(double value, double units)
  8. roundDown(double value, int gridSize)
  9. roundDown(final float realNumber)