org.shapelogic.util
Class DoubleCalculations

java.lang.Object
  extended by org.shapelogic.util.DoubleCalculations

public class DoubleCalculations
extends java.lang.Object

There are precision issues when doing calculations with double

Author:
Sami Badawi

Constructor Summary
DoubleCalculations()
           
 
Method Summary
static boolean doubleEquals(double x, double y)
           
static boolean doubleIsInt(double x)
           
static boolean doubleZero(double x)
           
static boolean isEven(double input)
           
static boolean oppositeSign(double d1, double d2)
          If one is 0 and other not return false
static boolean sameSign(double d1, double d2)
          If one is 0 and other not return false
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DoubleCalculations

public DoubleCalculations()
Method Detail

doubleEquals

public static boolean doubleEquals(double x,
                                   double y)

doubleZero

public static boolean doubleZero(double x)

doubleIsInt

public static boolean doubleIsInt(double x)

isEven

public static boolean isEven(double input)

oppositeSign

public static boolean oppositeSign(double d1,
                                   double d2)
If one is 0 and other not return false


sameSign

public static boolean sameSign(double d1,
                               double d2)
If one is 0 and other not return false



Copyright © 2008. All Rights Reserved.