Here you can find the source of floor(float f)
public static int floor(float f)
//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; } }