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, you need to have an instance of a Vector3
and another Vector3
to compare against. The method will return a new Vector3
with each component being the minimum of the two vectors' components.
Example usage:
Vector3 vectorA = new Vector3(3.0f, 5.0f, 7.0f);
Vector3 vectorB = new Vector3(4.0f, 2.0f, 8.0f);
Vector3 result = vectorA.ComponentMin(ref vectorB);
// result is now (3.0f, 2.0f, 7.0f)
Example
Vector3 vectorA = new Vector3(3.0f, 5.0f, 7.0f);
Vector3 vectorB = new Vector3(4.0f, 2.0f, 8.0f);
Vector3 result = vectorA.ComponentMin(ref vectorB);
// result is now (3.0f, 2.0f, 7.0f)