Class Coordinate3D<Q extends javax.measure.quantity.Quantity>

    • Method Detail

      • getDimension

        public int getDimension()
        Returns the number of elements held by this vector. This implementation always returns a value of 3.
        Specified by:
        getDimension in class Vector<Parameter<Q extends javax.measure.quantity.Quantity>>
        Returns:
        this vector dimension.
      • isApproxEqual

        public 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).
        Parameters:
        obj - the Coordinate3D object to compare with.
        Returns:
        true if this Coordinate3D is approximately identical to that Coordinate3D; false otherwise.
      • isApproxZero

        public boolean isApproxZero()
        Compares this Coordinate3D for approximate equality to zero (all the values are within the numerical roundoff error of zero).
        Returns:
        true if this Coordinate3D is approximately equal to zero; false otherwise.
      • asType

        public abstract <R extends javax.measure.quantity.Quantity> Coordinate3D<R> asType​(java.lang.Class<R> type)
                                                                                    throws java.lang.ClassCastException
        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.
        Type Parameters:
        R - The Quantity (unit type) to cast this parameter as.
        Parameters:
        type - the quantity class identifying the nature of the unit.
        Returns:
        this AbstractParamVector parameterized with the specified type.
        Throws:
        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.
      • toUnitVector

        public abstract Coordinate3D<javax.measure.quantity.Dimensionless> toUnitVector()
        Returns this vector converted to a unit vector with a vector magnitude of 1.0.
        Returns:
        this vector converted to a unit vector