Java floor floor(float f)

Here you can find the source of floor(float f)

Description

floor

License

LGPL

Declaration

public static int floor(float f) 

Method Source Code

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

public class Main {
    public static int floor(float f) {
        int i = (int) f;
        return f >= (float) i ? i : i - 1;
    }//  w ww  .j ava  2s .  c om

    public static int floor(double d) {
        int i = (int) d;
        return d >= (double) i ? i : i - 1;
    }
}

Related

  1. floor(final float val)
  2. floor(final float x)
  3. floor(float a)
  4. floor(float f)
  5. floor(float f)
  6. floor(float f)
  7. floor(float value)
  8. floor(float value)
  9. floor(float x)