Java Double Number Round round(double toRound)

Here you can find the source of round(double toRound)

Description

Rounds to two decimals.

License

Open Source License

Parameter

Parameter Description
toRound The value which will be rounded.

Return

Rounded value.

Declaration

public static double round(double toRound) 

Method Source Code

//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;
    }
}

Related

  1. round(Double number, Integer precision)
  2. round(Double ret, Integer doublePrecision)
  3. round(double round, int decimal, int ceilOrFloor)
  4. round(double Rpred[][])
  5. Round(double Rval, int Rpl)
  6. round(double v)
  7. round(double v, int precision)
  8. round(double val)
  9. round(double val)