Here you can find the source of FloatToInt(double x)
public final static long FloatToInt(double x)
//package com.java2s; //License from project: Open Source License public class Main { public final static long FloatToInt(double x) { return Math.round(x); }//from w ww. j ava 2 s . c o m }