|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.geotools.geometry.iso.util.DoubleOperation
public class DoubleOperation
This class offers elementary arithmetic operations for the elementary data type double
.
The operations are separated from the rest of the code to keep the option to interchange this package with a exact computation package (where needed).
The implementations in this class are non-robust in sense that round-errors may occur.
Constructor Summary | |
---|---|
DoubleOperation()
|
Method Summary | |
---|---|
static double |
add(double d1,
double d2)
Returns the sum of two doubles: d1 + d2 |
static double |
div(double d1,
double d2)
Returns the division of two doubles: d1 / d2 |
static double |
mult(double d1,
double d2)
Returns the multiplication of two doubles: d1 * d2 |
static double |
subtract(double d1,
double d2)
Returns the subtraction of two doubles: d1 - d2 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DoubleOperation()
Method Detail |
---|
public static double add(double d1, double d2)
d1
- First value to addd2
- Second value to add
public static double subtract(double d1, double d2)
d1
- First valued2
- Value to subtract from first value
public static double mult(double d1, double d2)
d1
- First value to multiplicated2
- Second value to multiplicate
public static double div(double d1, double d2)
d1
- Dividendd2
- Divisor
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |