Java tutorial
//package com.java2s; import android.util.Log; public class Main { public static double xround(double x, int num) { Log.e("---------- ", "" + x); return Math.round(x * Math.pow(10, num)) / Math.pow(10, num); } }