Interface UnmodifiableTuple2D<RT extends Tuple2D<? super RT>>

    • Method Summary

      All Methods Instance Methods Default Methods 
      Modifier and Type Method Description
      default void absolute()
      Sets each component of this tuple to its absolute value.
      default void absolute​(Tuple2D<?> tuple)
      Sets each component of the tuple parameter to its absolute value and places the modified values into this tuple.
      default void add​(double x, double y)
      Sets the value of this tuple to the sum of itself and x and y.
      default void add​(int x, int y)
      Sets the value of this tuple to the sum of itself and x and y.
      default void addX​(double x)
      Sets the x value of this tuple to the sum of itself and x.
      default void addX​(int x)
      Sets the x value of this tuple to the sum of itself and x.
      default void addY​(double y)
      Sets the y value of this tuple to the sum of itself and y.
      default void addY​(int y)
      Sets the y value of this tuple to the sum of itself and y.
      default void clamp​(double min, double max)
      Clamps this tuple to the range [low, high].
      default void clamp​(double min, double max, Tuple2D<?> tuple)
      Clamps the tuple parameter to the range [low, high] and places the values into this tuple.
      default void clamp​(int min, int max)
      Clamps this tuple to the range [low, high].
      default void clamp​(int min, int max, Tuple2D<?> tuple)
      Clamps the tuple parameter to the range [min, max] and places the values into this tuple.
      default void clampMax​(double max)
      Clamps the maximum value of this tuple to the max parameter.
      default void clampMax​(double max, Tuple2D<?> tuple)
      Clamps the maximum value of the tuple parameter to the max parameter and places the values into this tuple.
      default void clampMax​(int max)
      Clamps the maximum value of this tuple to the max parameter.
      default void clampMax​(int max, Tuple2D<?> tuple)
      Clamps the maximum value of the tuple parameter to the max parameter and places the values into this tuple.
      default void clampMin​(double min)
      Clamps the minimum value of this tuple to the min parameter.
      default void clampMin​(double min, Tuple2D<?> tuple)
      Clamps the minimum value of the tuple parameter to the min parameter and places the values into this tuple.
      default void clampMin​(int min)
      Clamps the minimum value of this tuple to the min parameter.
      default void clampMin​(int min, Tuple2D<?> tuple)
      Clamps the minimum value of the tuple parameter to the min parameter and places the values into this tuple.
      default void interpolate​(Tuple2D<?> tuple, double alpha)
      Linearly interpolates between this tuple and tuple t1 and places the result into this tuple: this = (1-alpha)*this + alpha*t1.
      default void interpolate​(Tuple2D<?> tuple1, Tuple2D<?> tuple2, double alpha)
      Linearly interpolates between tuples t1 and t2 and places the result into this tuple: this = (1-alpha)*t1 + alpha*t2.
      default void negate()
      Negates the value of this tuple in place.
      default void negate​(Tuple2D<?> tuple)
      Sets the value of this tuple to the negation of tuple t1.
      default void scale​(double scale)
      Sets the value of this tuple to the scalar multiplication of the scale factor with this.
      default void scale​(double scale, Tuple2D<?> tuple)
      Sets the value of this tuple to the scalar multiplication of tuple t1.
      default void scale​(int scale)
      Sets the value of this tuple to the scalar multiplication of the scale factor with this.
      default void scale​(int scale, Tuple2D<?> tuple)
      Sets the value of this tuple to the scalar multiplication of tuple t1.
      default void set​(double[] tuple)
      Sets the value of this tuple from the 2 values specified in the array.
      default void set​(double x, double y)
      Sets the value of this tuple to the specified x and y coordinates.
      default void set​(int[] tuple)
      Sets the value of this tuple from the 2 values specified in the array.
      default void set​(int x, int y)
      Sets the value of this tuple to the specified x and y coordinates.
      default void set​(Tuple2D<?> tuple)
      Sets the value of this tuple to the value of tuple t1.
      default void setX​(double x)
      Set the x coordinate.
      default void setX​(int x)
      Set the x coordinate.
      default void setY​(double y)
      Set the y coordinate.
      default void setY​(int y)
      Set the y coordinate.
      default void sub​(double x, double y)
      Sets the value of this tuple to the difference of itself and x and y.
      default void sub​(int x, int y)
      Sets the value of this tuple to the difference of itself and x and y.
      default void subX​(double x)
      Sets the x value of this tuple to the difference of itself and x.
      default void subX​(int x)
      Sets the x value of this tuple to the difference of itself and x.
      default void subY​(double y)
      Sets the y value of this tuple to the difference of itself and y.
      default void subY​(int y)
      Sets the y value of this tuple to the difference of itself and y.
    • Method Detail

      • absolute

        default void absolute()
        Description copied from interface: Tuple2D
        Sets each component of this tuple to its absolute value.
        Specified by:
        absolute in interface Tuple2D<RT extends Tuple2D<? super RT>>
      • absolute

        default void absolute​(Tuple2D<?> tuple)
        Description copied from interface: Tuple2D
        Sets each component of the tuple parameter to its absolute value and places the modified values into this tuple.
        Specified by:
        absolute in interface Tuple2D<RT extends Tuple2D<? super RT>>
        Parameters:
        tuple - the source tuple, which will not be modified
      • add

        default void add​(int x,
                         int y)
        Description copied from interface: Tuple2D
        Sets the value of this tuple to the sum of itself and x and y.
        Specified by:
        add in interface Tuple2D<RT extends Tuple2D<? super RT>>
        Parameters:
        x - x coordinate to add.
        y - y coordinate to add.
      • add

        default void add​(double x,
                         double y)
        Description copied from interface: Tuple2D
        Sets the value of this tuple to the sum of itself and x and y.
        Specified by:
        add in interface Tuple2D<RT extends Tuple2D<? super RT>>
        Parameters:
        x - x coordinate to add.
        y - y coordinate to add.
      • addX

        default void addX​(int x)
        Description copied from interface: Tuple2D
        Sets the x value of this tuple to the sum of itself and x.
        Specified by:
        addX in interface Tuple2D<RT extends Tuple2D<? super RT>>
        Parameters:
        x - x coordinate to add.
      • addX

        default void addX​(double x)
        Description copied from interface: Tuple2D
        Sets the x value of this tuple to the sum of itself and x.
        Specified by:
        addX in interface Tuple2D<RT extends Tuple2D<? super RT>>
        Parameters:
        x - x coordinate to add.
      • addY

        default void addY​(int y)
        Description copied from interface: Tuple2D
        Sets the y value of this tuple to the sum of itself and y.
        Specified by:
        addY in interface Tuple2D<RT extends Tuple2D<? super RT>>
        Parameters:
        y - y coordinate to add.
      • addY

        default void addY​(double y)
        Description copied from interface: Tuple2D
        Sets the y value of this tuple to the sum of itself and y.
        Specified by:
        addY in interface Tuple2D<RT extends Tuple2D<? super RT>>
        Parameters:
        y - y coordinate to add.
      • clamp

        default void clamp​(int min,
                           int max)
        Description copied from interface: Tuple2D
        Clamps this tuple to the range [low, high].
        Specified by:
        clamp in interface Tuple2D<RT extends Tuple2D<? super RT>>
        Parameters:
        min - the lowest value in this tuple after clamping
        max - the highest value in this tuple after clamping
      • clamp

        default void clamp​(double min,
                           double max)
        Description copied from interface: Tuple2D
        Clamps this tuple to the range [low, high].
        Specified by:
        clamp in interface Tuple2D<RT extends Tuple2D<? super RT>>
        Parameters:
        min - the lowest value in this tuple after clamping
        max - the highest value in this tuple after clamping
      • clamp

        default void clamp​(int min,
                           int max,
                           Tuple2D<?> tuple)
        Description copied from interface: Tuple2D
        Clamps the tuple parameter to the range [min, max] and places the values into this tuple.
        Specified by:
        clamp in interface Tuple2D<RT extends Tuple2D<? super RT>>
        Parameters:
        min - the lowest value in the tuple after clamping
        max - the highest value in the tuple after clamping
        tuple - the source tuple, which will not be modified
      • clamp

        default void clamp​(double min,
                           double max,
                           Tuple2D<?> tuple)
        Description copied from interface: Tuple2D
        Clamps the tuple parameter to the range [low, high] and places the values into this tuple.
        Specified by:
        clamp in interface Tuple2D<RT extends Tuple2D<? super RT>>
        Parameters:
        min - the lowest value in the tuple after clamping
        max - the highest value in the tuple after clamping
        tuple - the source tuple, which will not be modified
      • clampMin

        default void clampMin​(int min)
        Description copied from interface: Tuple2D
        Clamps the minimum value of this tuple to the min parameter.
        Specified by:
        clampMin in interface Tuple2D<RT extends Tuple2D<? super RT>>
        Parameters:
        min - the lowest value in this tuple after clamping
      • clampMin

        default void clampMin​(double min)
        Description copied from interface: Tuple2D
        Clamps the minimum value of this tuple to the min parameter.
        Specified by:
        clampMin in interface Tuple2D<RT extends Tuple2D<? super RT>>
        Parameters:
        min - the lowest value in this tuple after clamping
      • clampMin

        default void clampMin​(int min,
                              Tuple2D<?> tuple)
        Description copied from interface: Tuple2D
        Clamps the minimum value of the tuple parameter to the min parameter and places the values into this tuple.
        Specified by:
        clampMin in interface Tuple2D<RT extends Tuple2D<? super RT>>
        Parameters:
        min - the lowest value in the tuple after clamping
        tuple - the source tuple, which will not be modified
      • clampMin

        default void clampMin​(double min,
                              Tuple2D<?> tuple)
        Description copied from interface: Tuple2D
        Clamps the minimum value of the tuple parameter to the min parameter and places the values into this tuple.
        Specified by:
        clampMin in interface Tuple2D<RT extends Tuple2D<? super RT>>
        Parameters:
        min - the lowest value in the tuple after clamping
        tuple - the source tuple, which will not be modified
      • clampMax

        default void clampMax​(int max)
        Description copied from interface: Tuple2D
        Clamps the maximum value of this tuple to the max parameter.
        Specified by:
        clampMax in interface Tuple2D<RT extends Tuple2D<? super RT>>
        Parameters:
        max - the highest value in the tuple after clamping
      • clampMax

        default void clampMax​(double max)
        Description copied from interface: Tuple2D
        Clamps the maximum value of this tuple to the max parameter.
        Specified by:
        clampMax in interface Tuple2D<RT extends Tuple2D<? super RT>>
        Parameters:
        max - the highest value in the tuple after clamping
      • clampMax

        default void clampMax​(int max,
                              Tuple2D<?> tuple)
        Description copied from interface: Tuple2D
        Clamps the maximum value of the tuple parameter to the max parameter and places the values into this tuple.
        Specified by:
        clampMax in interface Tuple2D<RT extends Tuple2D<? super RT>>
        Parameters:
        max - the highest value in the tuple after clamping
        tuple - the source tuple, which will not be modified
      • clampMax

        default void clampMax​(double max,
                              Tuple2D<?> tuple)
        Description copied from interface: Tuple2D
        Clamps the maximum value of the tuple parameter to the max parameter and places the values into this tuple.
        Specified by:
        clampMax in interface Tuple2D<RT extends Tuple2D<? super RT>>
        Parameters:
        max - the highest value in the tuple after clamping
        tuple - the source tuple, which will not be modified
      • negate

        default void negate​(Tuple2D<?> tuple)
        Description copied from interface: Tuple2D
        Sets the value of this tuple to the negation of tuple t1.
        Specified by:
        negate in interface Tuple2D<RT extends Tuple2D<? super RT>>
        Parameters:
        tuple - the source tuple
      • negate

        default void negate()
        Description copied from interface: Tuple2D
        Negates the value of this tuple in place.
        Specified by:
        negate in interface Tuple2D<RT extends Tuple2D<? super RT>>
      • scale

        default void scale​(int scale,
                           Tuple2D<?> tuple)
        Description copied from interface: Tuple2D
        Sets the value of this tuple to the scalar multiplication of tuple t1.
        Specified by:
        scale in interface Tuple2D<RT extends Tuple2D<? super RT>>
        Parameters:
        scale - the scalar value
        tuple - the source tuple
      • scale

        default void scale​(double scale,
                           Tuple2D<?> tuple)
        Description copied from interface: Tuple2D
        Sets the value of this tuple to the scalar multiplication of tuple t1.
        Specified by:
        scale in interface Tuple2D<RT extends Tuple2D<? super RT>>
        Parameters:
        scale - the scalar value
        tuple - the source tuple
      • scale

        default void scale​(int scale)
        Description copied from interface: Tuple2D
        Sets the value of this tuple to the scalar multiplication of the scale factor with this.
        Specified by:
        scale in interface Tuple2D<RT extends Tuple2D<? super RT>>
        Parameters:
        scale - the scalar value
      • scale

        default void scale​(double scale)
        Description copied from interface: Tuple2D
        Sets the value of this tuple to the scalar multiplication of the scale factor with this.
        Specified by:
        scale in interface Tuple2D<RT extends Tuple2D<? super RT>>
        Parameters:
        scale - the scalar value
      • set

        default void set​(Tuple2D<?> tuple)
        Description copied from interface: Tuple2D
        Sets the value of this tuple to the value of tuple t1.
        Specified by:
        set in interface Tuple2D<RT extends Tuple2D<? super RT>>
        Parameters:
        tuple - the tuple to be copied
      • set

        default void set​(int x,
                         int y)
        Description copied from interface: Tuple2D
        Sets the value of this tuple to the specified x and y coordinates.
        Specified by:
        set in interface Tuple2D<RT extends Tuple2D<? super RT>>
        Parameters:
        x - the x coordinate
        y - the y coordinate
      • set

        default void set​(double x,
                         double y)
        Description copied from interface: Tuple2D
        Sets the value of this tuple to the specified x and y coordinates.
        Specified by:
        set in interface Tuple2D<RT extends Tuple2D<? super RT>>
        Parameters:
        x - the x coordinate
        y - the y coordinate
      • set

        default void set​(int[] tuple)
        Description copied from interface: Tuple2D
        Sets the value of this tuple from the 2 values specified in the array.
        Specified by:
        set in interface Tuple2D<RT extends Tuple2D<? super RT>>
        Parameters:
        tuple - the array of length 2 containing xy in order
      • set

        default void set​(double[] tuple)
        Description copied from interface: Tuple2D
        Sets the value of this tuple from the 2 values specified in the array.
        Specified by:
        set in interface Tuple2D<RT extends Tuple2D<? super RT>>
        Parameters:
        tuple - the array of length 2 containing xy in order
      • setX

        default void setX​(int x)
        Description copied from interface: Tuple2D
        Set the x coordinate.
        Specified by:
        setX in interface Tuple2D<RT extends Tuple2D<? super RT>>
        Parameters:
        x - value to x coordinate.
      • setX

        default void setX​(double x)
        Description copied from interface: Tuple2D
        Set the x coordinate.
        Specified by:
        setX in interface Tuple2D<RT extends Tuple2D<? super RT>>
        Parameters:
        x - value to x coordinate.
      • setY

        default void setY​(int y)
        Description copied from interface: Tuple2D
        Set the y coordinate.
        Specified by:
        setY in interface Tuple2D<RT extends Tuple2D<? super RT>>
        Parameters:
        y - value to y coordinate.
      • setY

        default void setY​(double y)
        Description copied from interface: Tuple2D
        Set the y coordinate.
        Specified by:
        setY in interface Tuple2D<RT extends Tuple2D<? super RT>>
        Parameters:
        y - value to y coordinate.
      • sub

        default void sub​(int x,
                         int y)
        Description copied from interface: Tuple2D
        Sets the value of this tuple to the difference of itself and x and y.
        Specified by:
        sub in interface Tuple2D<RT extends Tuple2D<? super RT>>
        Parameters:
        x - x coordinate to substract.
        y - y coordinate to substract.
      • sub

        default void sub​(double x,
                         double y)
        Description copied from interface: Tuple2D
        Sets the value of this tuple to the difference of itself and x and y.
        Specified by:
        sub in interface Tuple2D<RT extends Tuple2D<? super RT>>
        Parameters:
        x - x coordinate to substract.
        y - y coordinate to substract.
      • subX

        default void subX​(int x)
        Description copied from interface: Tuple2D
        Sets the x value of this tuple to the difference of itself and x.
        Specified by:
        subX in interface Tuple2D<RT extends Tuple2D<? super RT>>
        Parameters:
        x - x coordinate to substract.
      • subX

        default void subX​(double x)
        Description copied from interface: Tuple2D
        Sets the x value of this tuple to the difference of itself and x.
        Specified by:
        subX in interface Tuple2D<RT extends Tuple2D<? super RT>>
        Parameters:
        x - x coordinate to substract.
      • subY

        default void subY​(int y)
        Description copied from interface: Tuple2D
        Sets the y value of this tuple to the difference of itself and y.
        Specified by:
        subY in interface Tuple2D<RT extends Tuple2D<? super RT>>
        Parameters:
        y - y coordinate to substract.
      • subY

        default void subY​(double y)
        Description copied from interface: Tuple2D
        Sets the y value of this tuple to the difference of itself and y.
        Specified by:
        subY in interface Tuple2D<RT extends Tuple2D<? super RT>>
        Parameters:
        y - y coordinate to substract.
      • interpolate

        default void interpolate​(Tuple2D<?> tuple1,
                                 Tuple2D<?> tuple2,
                                 double alpha)
        Description copied from interface: Tuple2D
        Linearly interpolates between tuples t1 and t2 and places the result into this tuple: this = (1-alpha)*t1 + alpha*t2.
        Specified by:
        interpolate in interface Tuple2D<RT extends Tuple2D<? super RT>>
        Parameters:
        tuple1 - the first tuple
        tuple2 - the second tuple
        alpha - the alpha interpolation parameter (value in [0;1]).
      • interpolate

        default void interpolate​(Tuple2D<?> tuple,
                                 double alpha)
        Description copied from interface: Tuple2D
        Linearly interpolates between this tuple and tuple t1 and places the result into this tuple: this = (1-alpha)*this + alpha*t1.
        Specified by:
        interpolate in interface Tuple2D<RT extends Tuple2D<? super RT>>
        Parameters:
        tuple - the first tuple
        alpha - the alpha interpolation parameter