/*
 * Utility.java
 *
 * Created on Trečiadienis, 2007, Sausio 31, 00.28
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package Main.algorithms;

import java.math.*;

/**
 *
 * @author Vytautas&Remziukas
 */
public class Utility {
    
    /** Creates a new instance of Utility */
    public Utility() {
    }

    public static double Round(double r){
        int decimalPlace = 4;
        BigDecimal bd = new BigDecimal(r);
        bd = bd.setScale(decimalPlace,BigDecimal.ROUND_HALF_UP);
        r = bd.doubleValue();
        return r;
    }
}
