Q
- The Quantity (unit type, such as Length or Volume) of this parameter.public abstract class Coordinate3D<Q extends Quantity> extends AbstractParamVector<Q,Coordinate3D<Q>> implements javolution.lang.ValueType
Parameter
elements representing a
geometrical coordinate.
Modified by: Joseph A. Huwaldt
Constructor and Description |
---|
Coordinate3D() |
Modifier and Type | Method and Description |
---|---|
abstract <R extends Quantity> |
asType(java.lang.Class<R> type)
Casts this Coordinate3D to a parameterized unit of specified nature or throw a
ClassCastException if the dimension of the specified quantity and this
parameter's unit dimension do not match. |
int |
getDimension()
Returns the number of elements held by this vector.
|
boolean |
isApproxEqual(Coordinate3D<?> obj)
Compares this Coordinate3D against the specified Coordinate3D for approximate
equality (a Coordinate3D object with Vector3D values equal to this one to within
the numerical roundoff tolerance).
|
boolean |
isApproxZero()
Compares this Coordinate3D for approximate equality to zero (all the values are
within the numerical roundoff error of zero).
|
abstract Coordinate3D<Dimensionless> |
toUnitVector()
Returns this vector converted to a unit vector with a vector magnitude of 1.0.
|
angle, compareTo, divide, dot, doubleValue, fromVector3D, getUnit, getValue, longValue, mag, magValue, minus, norm, normValue, plus, times, to, toArray, toArray, toVector3D
copy, cross, equals, equals, get, hashCode, minus, opposite, plus, times, times, toString, toText
times
opposite, plus
public Coordinate3D()
public int getDimension()
getDimension
in class Vector<Parameter<Q extends Quantity>>
public boolean isApproxEqual(Coordinate3D<?> obj)
obj
- the Coordinate3D object to compare with.true
if this Coordinate3D is approximately identical to that
Coordinate3D; false
otherwise.public boolean isApproxZero()
true
if this Coordinate3D is approximately equal to zero;
false
otherwise.public abstract <R extends Quantity> Coordinate3D<R> asType(java.lang.Class<R> type) throws java.lang.ClassCastException
ClassCastException
if the dimension of the specified quantity and this
parameter's unit dimension do not match.R
- The Quantity (unit type) to cast this parameter as.type
- the quantity class identifying the nature of the unit.java.lang.ClassCastException
- if the dimension of this parameter's unit is different
from the specified quantity dimension.java.lang.UnsupportedOperationException
- if the specified quantity class does not have
a public static field named "UNIT" holding the standard unit for the quantity.public abstract Coordinate3D<Dimensionless> toUnitVector()