Java floor floor(float f)

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

Description

floor

License

Apache License

Declaration

public static int floor(float f) 

Method Source Code

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

public class Main {
    public static int floor(float f) {
        boolean neg = f < 0;
        int r = (int) f;

        if (neg)//  ww w.j  a  v  a 2s.c  o m
            r -= 1;

        return r;
    }
}

Related

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