Here you can find the source of floor(float value)
static public int floor(float value)
//package com.java2s; //License from project: Open Source License public class Main { static private final int BIG_ENOUGH_INT = 16 * 1024; static private final double BIG_ENOUGH_FLOOR = BIG_ENOUGH_INT; /** Returns the largest integer less than or equal to the specified float. This method will only properly floor floats from * -(2^14) to (Float.MAX_VALUE - 2^14). */ static public int floor(float value) { return (int) (value + BIG_ENOUGH_FLOOR) - BIG_ENOUGH_INT; }// ww w . jav a 2 s .c o m }