Java Double Number Round roundBig(double d)

Here you can find the source of roundBig(double d)

Description

round Big

License

Creative Commons License

Declaration

public static double roundBig(double d) 

Method Source Code

//package com.java2s;
// The license under which this software is released can be accessed at:

public class Main {
    public static double roundBig(double d) {
        long i = (long) d;
        d -= i;// w  w  w. j  av  a  2  s  .c  o m
        return i + (d >= 0.5 ? 1 : (d <= -0.5 ? -1 : 0));
    }
}

Related

  1. roundAndScale(double startValue, int places)
  2. roundAngle(double a, long n)
  3. roundAtDecimals(double number, int deci)
  4. roundAway(double d)
  5. roundAwayFromZero(double num)
  6. roundDec(float num, int dec)
  7. roundDecimal(Double value)
  8. roundDecimal(double x, int d)
  9. roundDecimals(double d, int decimalPlaces)