Java Double Number Round round2(double num)

Here you can find the source of round2(double num)

Description

round

License

Apache License

Declaration

public static double round2(double num) 

Method Source Code

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

public class Main {
    public static double round2(double num) {
        double result = num * 100;
        result = Math.round(result);
        result = result / 100;//  ww w.  j a  v  a  2 s.c  o  m
        return result;
    }
}

Related

  1. round(final Double value)
  2. round(final Double value)
  3. round(final double value, final int numDecimals)
  4. round(final double x, final int digits)
  5. round2(double d)
  6. round2(final double arg)
  7. round2(int a, int preserveDigits)
  8. round2Places(Double input)
  9. round5(final double value)