ch.javasoft.util.numeric
Class DoubleUtil

java.lang.Object
  extended by ch.javasoft.util.numeric.DoubleUtil

public class DoubleUtil
extends Object


Field Summary
static int MAX_PRECISION
           
 
Method Summary
static double round(double value, int precision)
           
static int signum(double value)
          Returns the signum of the long value, i.e.
static int signum(float value)
          Returns the signum of the int value, i.e.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX_PRECISION

public static final int MAX_PRECISION
See Also:
Constant Field Values
Method Detail

signum

public static int signum(double value)
Returns the signum of the long value, i.e. 1/-1/0 for a positive, negative or zero value

See Also:
Math.signum(double)

signum

public static int signum(float value)
Returns the signum of the int value, i.e. 1/-1/0 for a positive, negative or zero value

See Also:
Math.signum(float)

round

public static double round(double value,
                           int precision)