Uses of Class
civitas.celestis.math.vector.Vector2
Packages that use Vector2
Package
Description
-
Uses of Vector2 in civitas.celestis.math.decimal
Methods in civitas.celestis.math.decimal that return Vector2Modifier and TypeMethodDescriptionDecimal2.primValue()Converts this vector into a primitive vector.Constructors in civitas.celestis.math.decimal with parameters of type Vector2 -
Uses of Vector2 in civitas.celestis.math.matrix
Methods in civitas.celestis.math.matrix that return Vector2Modifier and TypeMethodDescriptionMultiplies a vector by this matrix, then returns the resulting vector.Methods in civitas.celestis.math.matrix with parameters of type Vector2 -
Uses of Vector2 in civitas.celestis.math.vector
Fields in civitas.celestis.math.vector declared as Vector2Modifier and TypeFieldDescriptionstatic final Vector2Vector2.NEGATIVE_XThe negative X unit vector.static final Vector2Vector2.NEGATIVE_YThe negative Y unit vector.static final Vector2Vector2.POSITIVE_XThe positive X unit vector.static final Vector2Vector2.POSITIVE_YThe positive Y unit vector.static final Vector2Vector2.ZEROA vector of no direction or magnitude.Methods in civitas.celestis.math.vector that return Vector2Modifier and TypeMethodDescriptionVector2.add(double s) Adds a scalar to this vector component-wise, then returns the resulting vector.Adds another vector to this vector, then returns the resulting vector.static Vector2Returns the simple average of the provided vectors.static Vector2Returns the simple average of the two vectors.Between this vector and the provided boundary vectorsminandmax, this returns a new vector whose components are clamped to respect the range of[min, max].Vector2.divide(double s) Divides this vector by a scalar component-wise, then returns the resulting vector.static Vector2Performs linear interpolation (LERP) between the starting valuesand the ending valuee.Vector2.map(DoubleUnaryOperator f) Applies the provided mapper functionfto each component of this tuple, then returns a new tuple containing the return values of the functionf.Between this vector and the provided boundary vectorv, this takes the maximum of each corresponding pair of components, then returns a new vector whose components are populated from that of the maximum values between each pair of components.static Vector2Returns the collective maximum vector between the provided vectors.Vector2.merge(Vector2 v, BinaryOperator<Double> f) Between this vector and the provided vectorv, this applies the merger functionfto each corresponding pair of components, then returns a new vector whose components are populated from the return values of the functionf.Between this vector and the provided boundary vectorv, this takes the minimum of each corresponding pair of components, then returns a new vector whose components are populated from that of the minimum values between each pair of components.static Vector2Returns the collective minimum vector between the provided vectors.Vector2.multiply(double s) Multiplies this vector by a scalar component-wise, then returns the resulting vector.Returns the complex number product between this vector and the provided vectorv.Vector2.negate()Negates all components of this vector, then returns the resulting vector.Vector2.normalize()Normalizes this vector to have a Euclidean norm (magnitude) of1.Vector2.normalizeOrDefault(Vector2 v) Normalizes this vector to have a Euclidean norm (magnitude) of1.Vector2.normalizeOrZero()Normalizes this vector ot have a Euclidean norm (magnitude) of1.static Vector2Vectors.random2()Returns a random unit vector.Vector2.rotate(double t) Rotates this vector counter-clockwise by the provided anglet.Vector2.subtract(double s) Subtracts this vector by a scalar component-wise, then returns the resulting vector.Subtracts another vector from this vector, then returns the resulting vector.static Vector2Returns the sum of the provided values.static Vector2Returns the sum of the two values.Methods in civitas.celestis.math.vector with parameters of type Vector2Modifier and TypeMethodDescriptionAdds another vector to this vector, then returns the resulting vector.static Vector2Returns the simple average of the provided vectors.static Vector2Returns the simple average of the two vectors.Between this vector and the provided boundary vectorsminandmax, this returns a new vector whose components are clamped to respect the range of[min, max].doubleReturns the Euclidean distance between this vector and the provided vectorv.doubleReturns the squared Euclidean distance between this vector and the provided vectorv.doubleVector2.distanceManhattan(Vector2 v) Returns the Manhattan distance between this vector and the provided vectorv.doubleReturns the dot product between this vector and the provided vectorv.booleanChecks for equality between this vector and the provided vectorv.static booleanChecks if the provided valuevalis within the range of[min, max].static Vector2Performs linear interpolation (LERP) between the starting valuesand the ending valuee.Between this vector and the provided boundary vectorv, this takes the maximum of each corresponding pair of components, then returns a new vector whose components are populated from that of the maximum values between each pair of components.static Vector2Returns the collective maximum vector between the provided vectors.Vector2.merge(Vector2 v, BinaryOperator<Double> f) Between this vector and the provided vectorv, this applies the merger functionfto each corresponding pair of components, then returns a new vector whose components are populated from the return values of the functionf.Between this vector and the provided boundary vectorv, this takes the minimum of each corresponding pair of components, then returns a new vector whose components are populated from that of the minimum values between each pair of components.static Vector2Returns the collective minimum vector between the provided vectors.Returns the complex number product between this vector and the provided vectorv.Vector2.normalizeOrDefault(Vector2 v) Normalizes this vector to have a Euclidean norm (magnitude) of1.Subtracts another vector from this vector, then returns the resulting vector.static Vector2Returns the sum of the provided values.static Vector2Returns the sum of the two values.