/** * Rounds double value to two significant signs. * * @param val value to be rounded. * @return rounded double value. */ private static double round2(double val) { return Math.floor(100 * val + 0.5) / 100; }