Java floor floor(double a, int n)

Here you can find the source of floor(double a, int n)

Description

floor

License

Open Source License

Declaration

public static double floor(double a, int n) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {

    public static double floor(double a, int n) {
        double p = Math.pow(10.0, n);
        return Math.floor((a * p) + 0.5) / p;
    }//from   w  w w .  j ava 2  s  . c  o m
}

Related

  1. floor(double a)
  2. floor(double a, double precision)
  3. floor(double a, int cutOfDigits)
  4. floor(double d)
  5. floor(double d)
  6. floor(double d)
  7. floor(double d, int exp)