Description
The ComponentMin
method of the Vector2
struct returns a new Vector2
instance where each component is the minimum of the corresponding components of the current vector and the specified other
vector. This method is useful for component-wise comparison and selection of the smallest values between two vectors.
Usage
To use the ComponentMin
method, call it on an instance of Vector2
and pass another Vector2
as the parameter. The method will return a new Vector2
with the minimum values for each component.
Example
Vector2 vector1 = new Vector2(3.0f, 5.0f);
Vector2 vector2 = new Vector2(4.0f, 2.0f);
Vector2 result = vector1.ComponentMin(vector2);
// result is now (3.0f, 2.0f)