Interface UnmodifiableVector1D<RV extends Vector1D<? super RV,​? super RP,​? super RS>,​RP extends Point1D<? super RP,​? super RV,​? super RS>,​RS extends Segment1D<?,​?>>

    • Method Detail

      • add

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

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

        default void scaleAdd​(int scale,
                              Vector1D<?,​?,​?> t1,
                              Vector1D<?,​?,​?> t2)
        Description copied from interface: Vector1D
        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 Vector1D<RV extends Vector1D<? super RV,​? super RP,​? super RS>,​RP extends Point1D<? super RP,​? super RV,​? super RS>,​RS extends Segment1D<?,​?>>
        Parameters:
        scale - the scalar value
        t1 - the tuple to be multipled
        t2 - the tuple to be added
      • scaleAdd

        default void scaleAdd​(double scale,
                              Vector1D<?,​?,​?> vector1,
                              Vector1D<?,​?,​?> vector2)
        Description copied from interface: Vector1D
        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 Vector1D<RV extends Vector1D<? super RV,​? super RP,​? super RS>,​RP extends Point1D<? super RP,​? super RV,​? super RS>,​RS extends Segment1D<?,​?>>
        Parameters:
        scale - the scalar value
        vector1 - the tuple to be multipled
        vector2 - the tuple to be added
      • scaleAdd

        default void scaleAdd​(int scale,
                              Vector1D<?,​?,​?> vector)
        Description copied from interface: Vector1D
        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 Vector1D<RV extends Vector1D<? super RV,​? super RP,​? super RS>,​RP extends Point1D<? super RP,​? super RV,​? super RS>,​RS extends Segment1D<?,​?>>
        Parameters:
        scale - the scalar value
        vector - the tuple to be added
      • scaleAdd

        default void scaleAdd​(double scale,
                              Vector1D<?,​?,​?> vector)
        Description copied from interface: Vector1D
        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 Vector1D<RV extends Vector1D<? super RV,​? super RP,​? super RS>,​RP extends Point1D<? super RP,​? super RV,​? super RS>,​RS extends Segment1D<?,​?>>
        Parameters:
        scale - the scalar value
        vector - the tuple to be added
      • sub

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

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

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

        default void normalize()
        Description copied from interface: Vector1D
        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 Vector1D<RV extends Vector1D<? super RV,​? super RP,​? super RS>,​RP extends Point1D<? super RP,​? super RV,​? super RS>,​RS extends Segment1D<?,​?>>
      • normalize

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

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