Here you can find the source of roundSonekiSuii(double amount1, double amount2)
public static double roundSonekiSuii(double amount1, double amount2)
//package com.java2s; /*//from ww w . j ava2s. c o m * Copyright(C) 2014 * NEC Corporation All rights reserved. * * No permission to use, copy, modify and distribute this software * and its documentation for any purpose is granted. * This software is provided under applicable license agreement only. */ public class Main { public static double roundSonekiSuii(double amount1, double amount2) { return round(((amount1 / amount2) * 100), 1); } public static double round(double value, int precision) { int scale = (int) Math.pow(10, precision); return (double) Math.round(value * scale) / scale; } }