Interface UnmodifiableVector2D<RV extends Vector2D<? super RV,​? super RP>,​RP extends Point2D<? super RP,​? super RV>>

    • Method Detail

      • add

        default void add​(Vector2D<?,​?> vector1,
                         Vector2D<?,​?> vector2)
        Description copied from interface: Vector2D
        Sets the value of this tuple to the sum of tuples vector1 and vector2.
        Specified by:
        add in interface Vector2D<RV extends Vector2D<? super RV,​? super RP>,​RP extends Point2D<? super RP,​? super RV>>
        Parameters:
        vector1 - the first tuple
        vector2 - the second tuple
      • add

        default void add​(Vector2D<?,​?> vector)
        Description copied from interface: Vector2D
        Sets the value of this tuple to the sum of itself and the given vector.
        Specified by:
        add in interface Vector2D<RV extends Vector2D<? super RV,​? super RP>,​RP extends Point2D<? super RP,​? super RV>>
        Parameters:
        vector - the other tuple
      • scaleAdd

        default void scaleAdd​(int scale,
                              Vector2D<?,​?> vector1,
                              Vector2D<?,​?> vector2)
        Description copied from interface: Vector2D
        Sets the value of this tuple to the scalar multiplication of tuple t1 plus tuple t2 (this = s*t1 + t2).
        Specified by:
        scaleAdd in interface Vector2D<RV extends Vector2D<? super RV,​? super RP>,​RP extends Point2D<? super RP,​? super RV>>
        Parameters:
        scale - the scalar value
        vector1 - the tuple to be multipled
        vector2 - the tuple to be added
      • scaleAdd

        default void scaleAdd​(double scale,
                              Vector2D<?,​?> vector1,
                              Vector2D<?,​?> vector2)
        Description copied from interface: Vector2D
        Sets the value of this tuple to the scalar multiplication of the tuple vector1 plus the tuple vector2 (this = s*vector1 + vector2).
        Specified by:
        scaleAdd in interface Vector2D<RV extends Vector2D<? super RV,​? super RP>,​RP extends Point2D<? super RP,​? super RV>>
        Parameters:
        scale - the scalar value
        vector1 - the tuple to be multipled
        vector2 - the tuple to be added
      • scaleAdd

        default void scaleAdd​(int scale,
                              Vector2D<?,​?> vector)
        Description copied from interface: Vector2D
        Sets the value of this tuple to the scalar multiplication of itself and then adds tuple vector (this = s*this + vector).
        Specified by:
        scaleAdd in interface Vector2D<RV extends Vector2D<? super RV,​? super RP>,​RP extends Point2D<? super RP,​? super RV>>
        Parameters:
        scale - the scalar value
        vector - the tuple to be added
      • scaleAdd

        default void scaleAdd​(double scale,
                              Vector2D<?,​?> vector)
        Description copied from interface: Vector2D
        Sets the value of this tuple to the scalar multiplication of itself and then adds tuple vector (this = s*this + vector).
        Specified by:
        scaleAdd in interface Vector2D<RV extends Vector2D<? super RV,​? super RP>,​RP extends Point2D<? super RP,​? super RV>>
        Parameters:
        scale - the scalar value
        vector - the tuple to be added
      • sub

        default void sub​(Vector2D<?,​?> vector1,
                         Vector2D<?,​?> vector2)
        Description copied from interface: Vector2D
        Sets the value of this tuple to the difference of tuples vector1 and vector2 (this = vector1 - vector2).
        Specified by:
        sub in interface Vector2D<RV extends Vector2D<? super RV,​? super RP>,​RP extends Point2D<? super RP,​? super RV>>
        Parameters:
        vector1 - the first tuple
        vector2 - the second tuple
      • sub

        default void sub​(Point2D<?,​?> point1,
                         Point2D<?,​?> point2)
        Description copied from interface: Vector2D
        Sets the value of this tuple to the difference of tuples point1 and point2 (this = point1 - point2).
        Specified by:
        sub in interface Vector2D<RV extends Vector2D<? super RV,​? super RP>,​RP extends Point2D<? super RP,​? super RV>>
        Parameters:
        point1 - the first tuple
        point2 - the second tuple
      • sub

        default void sub​(Vector2D<?,​?> vector1)
        Description copied from interface: Vector2D
        Sets the value of this tuple to the difference of itself and vector (this = this - vector).
        Specified by:
        sub in interface Vector2D<RV extends Vector2D<? super RV,​? super RP>,​RP extends Point2D<? super RP,​? super RV>>
        Parameters:
        vector1 - the other tuple
      • makeOrthogonal

        default void makeOrthogonal()
        Description copied from interface: Vector2D
        Change the coordinates of this vector to make it an orthogonal vector to the original coordinates.

        The orthogonal vector is always the one obtain after a clockwise rotation of this vector.

        The orthogonal vector does not depends on the current coordinate system.

        Specified by:
        makeOrthogonal in interface Vector2D<RV extends Vector2D<? super RV,​? super RP>,​RP extends Point2D<? super RP,​? super RV>>
      • normalize

        default void normalize​(Vector2D<?,​?> vector)
        Description copied from interface: Vector2D
        Sets the value of this vector to the normalization of vector vector.
        Specified by:
        normalize in interface Vector2D<RV extends Vector2D<? super RV,​? super RP>,​RP extends Point2D<? super RP,​? super RV>>
        Parameters:
        vector - the un-normalized vector
      • normalize

        default void normalize()
        Description copied from interface: Vector2D
        Normalizes this vector in place.

        If the length of the vector is zero, x and y are set to zero.

        Specified by:
        normalize in interface Vector2D<RV extends Vector2D<? super RV,​? super RP>,​RP extends Point2D<? super RP,​? super RV>>
      • setLength

        default void setLength​(double newLength)
        Description copied from interface: Vector2D
        Change the length of the vector. The direction of the vector is unchanged.
        Specified by:
        setLength in interface Vector2D<RV extends Vector2D<? super RV,​? super RP>,​RP extends Point2D<? super RP,​? super RV>>
        Parameters:
        newLength - - the new length.