Here you can find the source of ConvertToMeters(double distance)
public static double ConvertToMeters(double distance)
//package com.java2s; //License from project: LGPL import java.math.BigDecimal; public class Main { public static double ConvertToMeters(double distance) { return Round((distance * 0.2), 2); }//from ww w. j a v a 2s.c o m public static double Round(double unrounded, int precision) { BigDecimal bd = new BigDecimal(unrounded); BigDecimal rounded = bd.setScale(precision, BigDecimal.ROUND_HALF_UP); return rounded.doubleValue(); } }