Package org.eclipse.draw2d.geometry

# Class PrecisionGeometry

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

public class PrecisionGeometry extends Object
A Utilities class for precise geometry calculations.

Since:
  3.7

## Constructor Summary

Constructors
Constructor
Description
`PrecisionGeometry()`

## Method Summary

Modifier and Type
Method
Description
`protected static final BigDecimal`
`doubleToBigDecimal(double d)`
`protected static final int`
`doubleToInteger(double doubleValue)`
Converts a double value into an integer value, avoiding rounding effects.
`protected static final double`
`preciseAbs(double d)`
`protected static final double`
`preciseAdd(double d1, double d2)`
`protected static final double`
`preciseDivide(double d1, double d2)`
`protected static final double`
`preciseMultiply(double d1, double d2)`
`protected static final double`
`preciseNegate(double d)`
`protected static final 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 Details

### PrecisionGeometry

public PrecisionGeometry()

## Method Details

### 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 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.