Here you can find the source of toInt(double in)
static int toInt(double in)
//package com.java2s; //License from project: Open Source License public class Main { static int toInt(double in) { return (int) Math.round(in); }//from ww w .j a va 2s . co m }