Java floor floor(float a)

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

Description

Rounds the number down

License

Open Source License

Parameter

Parameter Description
a the number

Return

a rounded down number

Declaration

public static int floor(float a) 

Method Source Code

//package com.java2s;

public class Main {
    /**//from www . j  ava2  s  . co  m
     * Rounds the number down
     * @param a the number
     * @return a rounded down number
     */
    public static int floor(float a) {
        return (int) a;
    }

    /**
     * Rounds the number down
     * @param a the number
     * @return a rounded down number
     */
    public static long floor(double a) {
        return (long) a;
    }
}

Related

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