Tuple4DReadOnly
Vector4DBasics
Vector4D
, Vector4D32
public interface Vector4DReadOnly extends Tuple4DReadOnly
When describing a 4D tuple, its 4 components are often gathered in two groups: the scalar part
s
and the vector part (x
, y
, z
).
Note on the difference between applying a 3D transform on a quaternion and a 4D vector:
s
remains unchanged. The vector part (x
, y
, z
) is scaled and rotated, and
translated by s
times the translation part of the transform. Note that for s = 0
,
a 4D vector behaves as a 3D vector, and for s = 1
it behaves as a 3D point.
Modifier and Type | Method | Description |
---|---|---|
default boolean |
geometricallyEquals(Vector4DReadOnly other,
double epsilon) |
Tests if
this and other represent the same vector 4D to an epsilon . |
containsNaN, dot, epsilonEquals, equals, get, get, get, get, get, get, get, getElement, getElement32, getS, getS32, getX, getX32, getY, getY32, getZ, getZ32, norm, normSquared
default boolean geometricallyEquals(Vector4DReadOnly other, double epsilon)
this
and other
represent the same vector 4D to an epsilon
.
Two vectors are considered geometrically equal if the length of their difference is less than
or equal to epsilon
.
Note that this.geometricallyEquals(other, epsilon) == true
does not necessarily imply
this.epsilonEquals(other, epsilon)
and vice versa.
other
- the other vector 4D to compare against this. Not modified.epsilon
- the maximum length of the difference vector can be for the two vectors to be
considered equal.true
if the two vectors represent the same geometry, false
otherwise.