public abstract class TupleTools
extends java.lang.Object
Constructor | Description |
---|---|
TupleTools() |
Modifier and Type | Method | Description |
---|---|---|
static boolean |
epsilonEquals(Tuple2DReadOnly tuple1,
Tuple2DReadOnly tuple2,
double epsilon) |
Tests on a per component basis if the two given tuples are equal to an
epsilon . |
static boolean |
epsilonEquals(Tuple3DReadOnly tuple1,
Tuple3DReadOnly tuple2,
double epsilon) |
Tests on a per component basis if the two given tuples are equal to an
epsilon . |
static boolean |
epsilonEquals(Tuple4DReadOnly tuple1,
Tuple4DReadOnly tuple2,
double epsilon) |
Tests on a per component basis if the two given tuples are equal to an
epsilon . |
static double |
interpolate(double a,
double b,
double alpha) |
Deprecated.
|
public static boolean epsilonEquals(Tuple2DReadOnly tuple1, Tuple2DReadOnly tuple2, double epsilon)
epsilon
.tuple1
- the first tuple. Not modified.tuple2
- the second tuple. Not modified.epsilon
- the tolerance to use when comparing each component.true
if the two tuples are equal, false
otherwise.public static boolean epsilonEquals(Tuple3DReadOnly tuple1, Tuple3DReadOnly tuple2, double epsilon)
epsilon
.tuple1
- the first tuple. Not modified.tuple2
- the second tuple. Not modified.epsilon
- the tolerance to use when comparing each component.true
if the two tuples are equal, false
otherwise.public static boolean epsilonEquals(Tuple4DReadOnly tuple1, Tuple4DReadOnly tuple2, double epsilon)
epsilon
.tuple1
- the first tuple. Not modified.tuple2
- the second tuple. Not modified.epsilon
- the tolerance to use when comparing each component.true
if the two tuples are equal, false
otherwise.@Deprecated public static double interpolate(double a, double b, double alpha)
a
to b
given the percentage alpha
.
result = (1.0 - alpha) * a + alpha * b
a
- the first value used in the interpolation.b
- the second value used in the interpolation.alpha
- the percentage to use for the interpolation. A value of 0 will return a
,
while a value of 1 will return b
.