Class Tuple2DExtensions
- java.lang.Object
-
- org.arakhne.afc.math.extensions.xtext.Tuple2DExtensions
-
public final class Tuple2DExtensions extends Object
Xtext extensions for 2D vectors.- 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 Static Methods Concrete Methods Modifier and Type Method Description static <V extends Vector2D<V,?>>
Voperator_divide(double left, V right)
Scale this vector:left / right
.static <P extends Point2D<P,?>>
Poperator_minus(double left, P right)
Subtract the scalar to this point:left - right
.static <V extends Vector2D<V,?>>
Voperator_minus(double left, V right)
Subtract a vector to this scalar:left - right
.static <V extends Vector2D<V,?>>
Voperator_multiply(double left, V right)
Scale this vector:left * right
.static <P extends Point2D<P,?>>
Poperator_plus(double left, P right)
Sum of this point and a scalar:left + right
.static <V extends Vector2D<V,?>>
Voperator_plus(double left, V right)
Sum of this vector and the given scalar:left + right
.
-
-
-
Method Detail
-
operator_multiply
@Pure public static <V extends Vector2D<V,?>> V operator_multiply(double left, V right)
Scale this vector:left * right
.This function is an implementation of the operator for the languages that defined or based on the Xtext framework.
The operation
right * left
is supported byMatrix2d.operator_multiply(double)
.- Type Parameters:
V
- the type of the vector.- Parameters:
left
- the scaling factor.right
- the vector.- Returns:
- the scaled vector.
- See Also:
Tuple2D.scale(double)
,Vector2D.operator_multiply(double)
-
operator_multiply
@Pure public static <V extends Vector1D<V,?,?>> V operator_multiply(double left, V right)
Scale this vector:left * right
.This function is an implementation of the operator for the languages that defined or based on the Xtext framework.
The operation
right * left
is supported byMatrix2d.operator_multiply(double)
.- Type Parameters:
V
- the type of the vector.- Parameters:
left
- the scaling factor.right
- the vector.- Returns:
- the scaled vector.
- Since:
- 14.0
- See Also:
Tuple2D.scale(double)
,Vector2D.operator_multiply(double)
-
operator_divide
@Pure public static <V extends Vector2D<V,?>> V operator_divide(double left, V right)
Scale this vector:left / right
.This function is an implementation of the operator for the languages that defined or based on the Xtext framework.
The operation
right / left
is supported byMatrix2d.operator_divide(double)
.- Type Parameters:
V
- the type of the vector.- Parameters:
left
- the scaling factor.right
- the vector.- Returns:
- the scaled vector.
- See Also:
Vector2D.operator_divide(double)
-
operator_divide
@Pure public static <V extends Vector1D<V,?,?>> V operator_divide(double left, V right)
Scale this vector:left / right
.This function is an implementation of the operator for the languages that defined or based on the Xtext framework.
The operation
right / left
is supported byMatrix2d.operator_divide(double)
.- Type Parameters:
V
- the type of the vector.- Parameters:
left
- the scaling factor.right
- the vector.- Returns:
- the scaled vector.
- See Also:
Vector2D.operator_divide(double)
-
operator_minus
@Pure public static <V extends Vector2D<V,?>> V operator_minus(double left, V right)
Subtract a vector to this scalar:left - right
.This function is an implementation of the operator for the languages that defined or based on the Xtext framework.
The operation
right - left
is supported byVector2D.operator_minus(double)
.- Type Parameters:
V
- the type of the vector.- Parameters:
left
- the scaling factor.right
- the vector.- Returns:
- the result.
- See Also:
Vector2D.sub(Vector2D)
,Vector2D.operator_minus(double)
-
operator_minus
@Pure public static <V extends Vector1D<V,?,?>> V operator_minus(double left, V right)
Subtract a vector to this scalar:left - right
.This function is an implementation of the operator for the languages that defined or based on the Xtext framework.
The operation
right - left
is supported byVector2D.operator_minus(double)
.- Type Parameters:
V
- the type of the vector.- Parameters:
left
- the scaling factor.right
- the vector.- Returns:
- the result.
- Since:
- 14.0
- See Also:
Vector2D.sub(Vector2D)
,Vector2D.operator_minus(double)
-
operator_minus
@Pure public static <P extends Point2D<P,?>> P operator_minus(double left, P right)
Subtract the scalar to this point:left - right
.This function is an implementation of the operator for the languages that defined or based on the Xtext framework.
The operation
right + left
is supported byPoint2D.operator_minus(double)
.- Type Parameters:
P
- the type of the point.- Parameters:
left
- the scaling factor.right
- the vector.- Returns:
- the result.
- See Also:
Point2D.sub(Point2D, Vector2D)
,Point2D.operator_minus(double)
-
operator_plus
@Pure public static <V extends Vector2D<V,?>> V operator_plus(double left, V right)
Sum of this vector and the given scalar:left + right
.This function is an implementation of the operator for the languages that defined or based on the Xtext framework.
The operation
right + left
is supported byVector2D.operator_plus(double)
.- Type Parameters:
V
- the type of the vector.- Parameters:
left
- the scaling factor.right
- the vector.- Returns:
- the result.
- See Also:
Vector2D.add(Vector2D, Vector2D)
,Vector2D.operator_plus(double)
-
operator_plus
@Pure public static <V extends Vector1D<V,?,?>> V operator_plus(double left, V right)
Sum of this vector and the given scalar:left + right
.This function is an implementation of the operator for the languages that defined or based on the Xtext framework.
The operation
right + left
is supported byVector2D.operator_plus(double)
.- Type Parameters:
V
- the type of the vector.- Parameters:
left
- the scaling factor.right
- the vector.- Returns:
- the result.
- Since:
- 14.0
- See Also:
Vector2D.add(Vector2D, Vector2D)
,Vector2D.operator_plus(double)
-
operator_plus
@Pure public static <P extends Point2D<P,?>> P operator_plus(double left, P right)
Sum of this point and a scalar:left + right
.This function is an implementation of the operator for the languages that defined or based on the Xtext framework.
The operation
right + left
is supported byPoint2D.operator_plus(double)
.- Type Parameters:
P
- the type of the point.- Parameters:
left
- the scaling factor.right
- the vector.- Returns:
- the result.
- See Also:
Point2D.add(Point2D, Vector2D)
,Point2D.operator_plus(double)
-
-