Description
The ComponentMin
method of the Vector3Int
struct returns a new Vector3Int
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, you need to have an instance of Vector3Int
and another Vector3Int
to compare against. Call the method on the first vector, passing the second vector as a parameter. The method will return a new Vector3Int
with the minimum values for each component.
Example
Vector3Int vector1 = new Vector3Int(3, 5, 7);
Vector3Int vector2 = new Vector3Int(4, 2, 8);
Vector3Int result = vector1.ComponentMin(vector2);
// result is now (3, 2, 7)