Here you can find the source of modValue(double v, int precision)
private static long modValue(double v, int precision)
//package com.java2s; //License from project: Open Source License public class Main { private static long modValue(double v, int precision) { return precision <= 0 ? (long) v : (long) (v * Math.pow(10, precision)); }/*w w w .ja v a 2 s . co m*/ private static long modValue(float v, int precision) { return precision <= 0 ? (long) v : (long) (v * Math.pow(10, precision)); } }