Java floor floor(float f)

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

Description

Rounds the given number down to an int.

License

Open Source License

Parameter

Parameter Description

Declaration

public static int floor(float f) 

Method Source Code

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

public class Main {
    /**/*from   ww  w  . j a va 2  s . c om*/
     * Rounds the given number down to an int.
     * @param float
     * @returns the floored value
     */
    public static int floor(float f) {

        return (int) (f - f % 1f);
    }
}

Related

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