Here you can find the source of round(double toRound)
Parameter | Description |
---|---|
toRound | The value which will be rounded. |
public static double round(double toRound)
//package com.java2s; //License from project: Open Source License public class Main { /**//from ww w . j ava2s.c o m * Rounds to two decimals. * * @param toRound * The value which will be rounded. * @return Rounded value. */ public static double round(double toRound) { return Math.round(toRound * 100.0) / 100.0; } }