Java floor floor(double d, int p)

Here you can find the source of floor(double d, int p)

Description

floor

License

Apache License

Declaration

public static double floor(double d, int p) 

Method Source Code

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

public class Main {

    public static double floor(double d, int p) {
        long tmp = (long) Math.pow(10, p);
        double num = Math.floor(d * tmp);
        num /= tmp;/* w ww.java2 s  .com*/
        return num;
    }
}

Related

  1. floor(double a, int n)
  2. floor(double d)
  3. floor(double d)
  4. floor(double d)
  5. floor(double d, int exp)
  6. floor(double num)
  7. floor(double num, int bit)
  8. floor(double number, int decimals)
  9. floor(double value, int decimal)