Java floor floor(double value, int scale)

Here you can find the source of floor(double value, int scale)

Description

Floor.

License

Apache License

Parameter

Parameter Description
value the value
scale the scale

Return

the double

Declaration

public static double floor(double value, int scale) 

Method Source Code

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

public class Main {
    /**/*  w w  w  . j  av  a  2 s. c  om*/
     * Floor.
     *
     * @param value
     *            the value
     * @param scale
     *            the scale
     * @return the double
     */
    public static double floor(double value, int scale) {
        double power = Math.pow(10, scale);
        return Math.floor(value * power) / power;
    }
}

Related

  1. floor(double d, int p)
  2. floor(double num)
  3. floor(double num, int bit)
  4. floor(double number, int decimals)
  5. floor(double value, int decimal)
  6. floor(double var0)
  7. floor(double x)
  8. floor(double x)
  9. floor(double x)