Description
The ComponentMin
method of the Vector3
struct returns a new Vector3
where each component is the minimum of the corresponding components of the current vector and another specified 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 Vector3
and pass another Vector3
as a reference parameter. The method will return a new Vector3
with the minimum values for each component.
Example
Vector3 vector1 = new Vector3(3.0f, 5.0f, 7.0f);
Vector3 vector2 = new Vector3(4.0f, 2.0f, 8.0f);
Vector3 result = vector1.ComponentMin(ref vector2);
// result is now (3.0f, 2.0f, 7.0f)