Here you can find the source of roundNumber(double rowNumber, int roundingPoint)
public static double roundNumber(double rowNumber, int roundingPoint)
//package com.java2s; //License from project: Apache License public class Main { public static double roundNumber(double rowNumber, int roundingPoint) { double base = Math.pow(10D, roundingPoint); return (double) Math.round(rowNumber * base) / base; }//w w w .ja v a2s . c o m }