Interface IVector1

    • Method Detail

      • add

        IVector1 add​(IVector1 vector)
        Adds another vector to this vector, adding individual components.
        Parameters:
        vector - the vector to add to this vector
        Returns:
        a reference to the called vector (NOT a copy)
      • subtract

        IVector1 subtract​(IVector1 vector)
        Subtracts another vector to this vector, subtracting individual components.
        Parameters:
        vector - the vector to subtract from this vector
        Returns:
        a reference to the called vector (NOT a copy)
      • multiply

        IVector1 multiply​(IVector1 vector)
        Performs a multiplication on the vector.
        Parameters:
        vector - vector
        Returns:
        a reference to the called vector (NOT a copy)
      • zero

        IVector1 zero()
        Sets the vector component to zero.
        Returns:
        a reference to the called vector (NOT a copy)
      • negate

        IVector1 negate()
        Negates the vector by negating its components.
        Returns:
        a reference to the called vector (NOT a copy)
      • sqrt

        IVector1 sqrt()
        Calculate the square root.
        Returns:
        The square root.
      • cbrt

        IVector1 cbrt()
        Calculate the cube root.
        Returns:
        The cube root.
      • getDistance

        IVector1 getDistance​(IVector1 vector)
        Returns the distance to another vector
        Parameters:
        vector - other vector
        Returns:
        distance
      • getAsInteger

        int getAsInteger()
        Returns the vector as integer.
        Returns:
        vector as integer
      • getAsLong

        long getAsLong()
        Returns the vector as long.
        Returns:
        vector as long
      • getAsFloat

        float getAsFloat()
        Returns the vector as float.
        Returns:
        vector as float
      • getAsDouble

        double getAsDouble()
        Returns the vector as double.
        Returns:
        vector as double
      • getAsBigDecimal

        java.math.BigDecimal getAsBigDecimal()
        Returns the vector as BigDecimal.
        Returns:
        vector as BigDecimal
      • copy

        IVector1 copy()
        Makes a copy of the vector without using the complex clone interface.
        Returns:
        copy of the vector
      • clone

        java.lang.Object clone()
                        throws java.lang.CloneNotSupportedException
        Generates a deep clone of the vector.
        Returns:
        clone of this vector
        Throws:
        java.lang.CloneNotSupportedException
      • equals

        boolean equals​(java.lang.Object obj)
        Compares the vector to an object
        Overrides:
        equals in class java.lang.Object
        Parameters:
        obj - the object
        Returns:
        always returns false unless the object is an IVector2, in which case it is equivalent to equals(IVector vector)
      • equals

        boolean equals​(IVector1 vector)
        Compares the vector to another vector. The vectors are equal if the components are equal.
        Parameters:
        vector - the other vector
        Returns:
        true if the vectors are equal
      • greater

        boolean greater​(IVector1 vector)
        Tests if the vector is greater than another vector.
        Parameters:
        vector - the other vector
        Returns:
        true if the vector is greater than the given vector.
      • less

        boolean less​(IVector1 vector)
        Tests if the vector is less than another vector.
        Parameters:
        vector - the other vector
        Returns:
        true if the vector is less than the given vector.
      • createVector2

        IVector2 createVector2​(IVector1 sec)
        Create a vector2 from this and another vector.
        Parameters:
        sec - The second vector.