Package org.arakhne.afc.math.geometry.d2
Interface UnmodifiableTuple2D<RT extends Tuple2D<? super RT>>
-
- Type Parameters:
RT- is the type of data that can be returned by this tuple.
- All Superinterfaces:
Cloneable,JsonableObject,Serializable,Tuple2D<RT>
- All Known Subinterfaces:
UnmodifiablePoint1D<RP,RV,RS>,UnmodifiablePoint2D<RP,RV>,UnmodifiableVector1D<RV,RP,RS>,UnmodifiableVector2D<RV,RP>
- All Known Implementing Classes:
ImmutablePoint1D,ImmutablePoint2D,ImmutableVector1D,ImmutableVector2D
public interface UnmodifiableTuple2D<RT extends Tuple2D<? super RT>> extends Tuple2D<RT>
Unmodifiable 2D tuple.- Since:
- 13.0
- Version:
- 17.0 2020-01-04 14:41:43
- Author:
- Stéphane GALLAND
- Maven Group Id:
- org.arakhne.afc.core
- Maven Artifact Id:
- mathgeom
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default voidabsolute()Sets each component of this tuple to its absolute value.default voidabsolute(Tuple2D<?> tuple)Sets each component of the tuple parameter to its absolute value and places the modified values into this tuple.default voidadd(double x, double y)Sets the value of this tuple to the sum of itself and x and y.default voidadd(int x, int y)Sets the value of this tuple to the sum of itself and x and y.default voidaddX(double x)Sets the x value of this tuple to the sum of itself and x.default voidaddX(int x)Sets the x value of this tuple to the sum of itself and x.default voidaddY(double y)Sets the y value of this tuple to the sum of itself and y.default voidaddY(int y)Sets the y value of this tuple to the sum of itself and y.default voidclamp(double min, double max)Clamps this tuple to the range [low, high].default voidclamp(double min, double max, Tuple2D<?> tuple)Clamps the tuple parameter to the range [low, high] and places the values into this tuple.default voidclamp(int min, int max)Clamps this tuple to the range [low, high].default voidclamp(int min, int max, Tuple2D<?> tuple)Clamps the tuple parameter to the range [min, max] and places the values into this tuple.default voidclampMax(double max)Clamps the maximum value of this tuple to the max parameter.default voidclampMax(double max, Tuple2D<?> tuple)Clamps the maximum value of the tuple parameter to the max parameter and places the values into this tuple.default voidclampMax(int max)Clamps the maximum value of this tuple to the max parameter.default voidclampMax(int max, Tuple2D<?> tuple)Clamps the maximum value of the tuple parameter to the max parameter and places the values into this tuple.default voidclampMin(double min)Clamps the minimum value of this tuple to the min parameter.default voidclampMin(double min, Tuple2D<?> tuple)Clamps the minimum value of the tuple parameter to the min parameter and places the values into this tuple.default voidclampMin(int min)Clamps the minimum value of this tuple to the min parameter.default voidclampMin(int min, Tuple2D<?> tuple)Clamps the minimum value of the tuple parameter to the min parameter and places the values into this tuple.default voidinterpolate(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 voidinterpolate(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 voidnegate()Negates the value of this tuple in place.default voidnegate(Tuple2D<?> tuple)Sets the value of this tuple to the negation of tuple t1.default voidscale(double scale)Sets the value of this tuple to the scalar multiplication of the scale factor with this.default voidscale(double scale, Tuple2D<?> tuple)Sets the value of this tuple to the scalar multiplication of tuple t1.default voidscale(int scale)Sets the value of this tuple to the scalar multiplication of the scale factor with this.default voidscale(int scale, Tuple2D<?> tuple)Sets the value of this tuple to the scalar multiplication of tuple t1.default voidset(double[] tuple)Sets the value of this tuple from the 2 values specified in the array.default voidset(double x, double y)Sets the value of this tuple to the specified x and y coordinates.default voidset(int[] tuple)Sets the value of this tuple from the 2 values specified in the array.default voidset(int x, int y)Sets the value of this tuple to the specified x and y coordinates.default voidset(Tuple2D<?> tuple)Sets the value of this tuple to the value of tuple t1.default voidsetX(double x)Set the x coordinate.default voidsetX(int x)Set the x coordinate.default voidsetY(double y)Set the y coordinate.default voidsetY(int y)Set the y coordinate.default voidsub(double x, double y)Sets the value of this tuple to the difference of itself and x and y.default voidsub(int x, int y)Sets the value of this tuple to the difference of itself and x and y.default voidsubX(double x)Sets the x value of this tuple to the difference of itself and x.default voidsubX(int x)Sets the x value of this tuple to the difference of itself and x.default voidsubY(double y)Sets the y value of this tuple to the difference of itself and y.default voidsubY(int y)Sets the y value of this tuple to the difference of itself and y.-
Methods inherited from interface org.arakhne.afc.vmutil.json.JsonableObject
toJson
-
-
-
-
Method Detail
-
absolute
default void absolute()
Description copied from interface:Tuple2DSets each component of this tuple to its absolute value.
-
absolute
default void absolute(Tuple2D<?> tuple)
Description copied from interface:Tuple2DSets each component of the tuple parameter to its absolute value and places the modified values into this tuple.
-
add
default void add(int x, int y)Description copied from interface:Tuple2DSets the value of this tuple to the sum of itself and x and y.
-
add
default void add(double x, double y)Description copied from interface:Tuple2DSets the value of this tuple to the sum of itself and x and y.
-
addX
default void addX(int x)
Description copied from interface:Tuple2DSets the x value of this tuple to the sum of itself and x.
-
addX
default void addX(double x)
Description copied from interface:Tuple2DSets the x value of this tuple to the sum of itself and x.
-
addY
default void addY(int y)
Description copied from interface:Tuple2DSets the y value of this tuple to the sum of itself and y.
-
addY
default void addY(double y)
Description copied from interface:Tuple2DSets the y value of this tuple to the sum of itself and y.
-
clamp
default void clamp(int min, int max)Description copied from interface:Tuple2DClamps this tuple to the range [low, high].
-
clamp
default void clamp(double min, double max)Description copied from interface:Tuple2DClamps this tuple to the range [low, high].
-
clamp
default void clamp(int min, int max, Tuple2D<?> tuple)Description copied from interface:Tuple2DClamps the tuple parameter to the range [min, max] and places the values into this tuple.
-
clamp
default void clamp(double min, double max, Tuple2D<?> tuple)Description copied from interface:Tuple2DClamps the tuple parameter to the range [low, high] and places the values into this tuple.
-
clampMin
default void clampMin(int min)
Description copied from interface:Tuple2DClamps the minimum value of this tuple to the min parameter.
-
clampMin
default void clampMin(double min)
Description copied from interface:Tuple2DClamps the minimum value of this tuple to the min parameter.
-
clampMin
default void clampMin(int min, Tuple2D<?> tuple)Description copied from interface:Tuple2DClamps the minimum value of the tuple parameter to the min parameter and places the values into this tuple.
-
clampMin
default void clampMin(double min, Tuple2D<?> tuple)Description copied from interface:Tuple2DClamps the minimum value of the tuple parameter to the min parameter and places the values into this tuple.
-
clampMax
default void clampMax(int max)
Description copied from interface:Tuple2DClamps the maximum value of this tuple to the max parameter.
-
clampMax
default void clampMax(double max)
Description copied from interface:Tuple2DClamps the maximum value of this tuple to the max parameter.
-
clampMax
default void clampMax(int max, Tuple2D<?> tuple)Description copied from interface:Tuple2DClamps the maximum value of the tuple parameter to the max parameter and places the values into this tuple.
-
clampMax
default void clampMax(double max, Tuple2D<?> tuple)Description copied from interface:Tuple2DClamps the maximum value of the tuple parameter to the max parameter and places the values into this tuple.
-
negate
default void negate(Tuple2D<?> tuple)
Description copied from interface:Tuple2DSets the value of this tuple to the negation of tuple t1.
-
negate
default void negate()
Description copied from interface:Tuple2DNegates the value of this tuple in place.
-
scale
default void scale(int scale, Tuple2D<?> tuple)Description copied from interface:Tuple2DSets the value of this tuple to the scalar multiplication of tuple t1.
-
scale
default void scale(double scale, Tuple2D<?> tuple)Description copied from interface:Tuple2DSets the value of this tuple to the scalar multiplication of tuple t1.
-
scale
default void scale(int scale)
Description copied from interface:Tuple2DSets the value of this tuple to the scalar multiplication of the scale factor with this.
-
scale
default void scale(double scale)
Description copied from interface:Tuple2DSets the value of this tuple to the scalar multiplication of the scale factor with this.
-
set
default void set(Tuple2D<?> tuple)
Description copied from interface:Tuple2DSets the value of this tuple to the value of tuple t1.
-
set
default void set(int x, int y)Description copied from interface:Tuple2DSets the value of this tuple to the specified x and y coordinates.
-
set
default void set(double x, double y)Description copied from interface:Tuple2DSets the value of this tuple to the specified x and y coordinates.
-
set
default void set(int[] tuple)
Description copied from interface:Tuple2DSets the value of this tuple from the 2 values specified in the array.
-
set
default void set(double[] tuple)
Description copied from interface:Tuple2DSets the value of this tuple from the 2 values specified in the array.
-
setX
default void setX(int x)
Description copied from interface:Tuple2DSet the x coordinate.
-
setX
default void setX(double x)
Description copied from interface:Tuple2DSet the x coordinate.
-
setY
default void setY(int y)
Description copied from interface:Tuple2DSet the y coordinate.
-
setY
default void setY(double y)
Description copied from interface:Tuple2DSet the y coordinate.
-
sub
default void sub(int x, int y)Description copied from interface:Tuple2DSets the value of this tuple to the difference of itself and x and y.
-
sub
default void sub(double x, double y)Description copied from interface:Tuple2DSets the value of this tuple to the difference of itself and x and y.
-
subX
default void subX(int x)
Description copied from interface:Tuple2DSets the x value of this tuple to the difference of itself and x.
-
subX
default void subX(double x)
Description copied from interface:Tuple2DSets the x value of this tuple to the difference of itself and x.
-
subY
default void subY(int y)
Description copied from interface:Tuple2DSets the y value of this tuple to the difference of itself and y.
-
subY
default void subY(double y)
Description copied from interface:Tuple2DSets the y value of this tuple to the difference of itself and y.
-
interpolate
default void interpolate(Tuple2D<?> tuple1, Tuple2D<?> tuple2, double alpha)
Description copied from interface:Tuple2DLinearly interpolates between tuples t1 and t2 and places the result into this tuple: this = (1-alpha)*t1 + alpha*t2.- Specified by:
interpolatein interfaceTuple2D<RT extends Tuple2D<? super RT>>- Parameters:
tuple1- the first tupletuple2- the second tuplealpha- the alpha interpolation parameter (value in [0;1]).
-
interpolate
default void interpolate(Tuple2D<?> tuple, double alpha)
Description copied from interface:Tuple2DLinearly interpolates between this tuple and tuple t1 and places the result into this tuple: this = (1-alpha)*this + alpha*t1.- Specified by:
interpolatein interfaceTuple2D<RT extends Tuple2D<? super RT>>- Parameters:
tuple- the first tuplealpha- the alpha interpolation parameter
-
-