Vector2Int ComponentMin( Vector2Int other )

book_4_sparkGenerated
code_blocksInput

Description

The ComponentMin method of the Vector2Int struct returns a new Vector2Int 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 two Vector2Int instances. Call the method on one instance and pass the other instance as a parameter. The method will return a new Vector2Int with the minimum values for each component.

Example

Vector2Int vectorA = new Vector2Int(3, 5);
Vector2Int vectorB = new Vector2Int(4, 2);

Vector2Int result = vectorA.ComponentMin(vectorB);
// result is now (3, 2)