org.eclipse.draw2d.geometry

## Class PrecisionGeometry

- java.lang.Object
- - org.eclipse.draw2d.geometry.PrecisionGeometry

    public class PrecisionGeometry
    extends java.lang.Object

A Utilities class for precise geometry calculations.

Since:
  3.7

### Constructor Summary

Constructors
Constructor and Description
`PrecisionGeometry()`

### Method Summary

Methods
`protected static java.math.BigDecimal` `doubleToBigDecimal(double d)`
`protected static int` `doubleToInteger(double doubleValue)` Converts a double value into an integer value, avoiding rounding effects.
`protected static double` `preciseAbs(double d)`
`protected static double` `preciseAdd(double d1, double d2)`
`protected static double` `preciseDivide(double d1, double d2)`
`protected static double` `preciseMultiply(double d1, double d2)`
`protected static double` `preciseNegate(double d)`
`protected static double` `preciseSubtract(double d1, double d2)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### PrecisionGeometry

    public PrecisionGeometry()

### Method Detail

#### preciseAdd

    protected static final double preciseAdd(double d1,
                    double d2)

#### preciseSubtract

    protected static final double preciseSubtract(double d1,
                         double d2)

#### preciseMultiply

    protected static final double preciseMultiply(double d1,
                         double d2)

#### preciseDivide

    protected static final double preciseDivide(double d1,
                       double d2)

#### preciseNegate

    protected static final double preciseNegate(double d)

#### preciseAbs

    protected static final double preciseAbs(double d)

#### doubleToBigDecimal

    protected static final java.math.BigDecimal doubleToBigDecimal(double d)

#### doubleToInteger

    protected static final int doubleToInteger(double doubleValue)

Converts a double value into an integer value, avoiding rounding effects.

Parameters:
  `doubleValue` - the double value to convert
Returns:
  the integer value for the double.