Here you can find the source of rounder(float value, int digits)
public static float rounder(float value, int digits)
//package com.java2s; //License from project: Open Source License public class Main { public static float rounder(float value, int digits) { // rounds value to digits behind the decimal point return Math.round(value * Math.pow(10, digits) + 0.5) / (float) Math.pow(10, digits); }// ww w . j av a2 s.c om }