Java Number Round roundTo2Decimals(double value)

Here you can find the source of roundTo2Decimals(double value)

Description

round To Decimals

License

Apache License

Declaration

public static double roundTo2Decimals(double value) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    public static double roundTo2Decimals(double value) {
        return (double) Math.round(value * 100) / 100;
    }/* w w  w  .ja v a2s .com*/
}

Related

  1. roundTo(final double VALUE, final double TARGET)
  2. roundTo(float number, int base)
  3. roundTo(float number, int numPlaces)
  4. roundTo(float val, int numPlaces)
  5. roundTo100th(double w)
  6. roundTo2Digits(double amount)
  7. roundTo2SigPlaces(double value)
  8. roundTo3Places(double n)
  9. roundTo6decimals(Double x)