Java Double Number Round roundAway(double d)

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

Description

round Away

License

LGPL

Declaration

public static int roundAway(double d) 

Method Source Code

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

public class Main {
    public static int roundAway(double d) {
        return (int) (d < 0 ? Math.floor(d) : Math.ceil(d));
    }// w  w w. j a  v  a  2 s. co m
}

Related

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