Description
The Max
method in the Vector2Int
struct is a static method that returns a new Vector2Int
instance. This instance is composed of the maximum values of the corresponding components from two input Vector2Int
instances, a
and b
. This method is useful for determining the component-wise maximum of two vectors.
Usage
To use the Max
method, call it with two Vector2Int
instances as arguments. The method will return a new Vector2Int
where each component is the maximum of the corresponding components of the input vectors.
Example
Vector2Int vectorA = new Vector2Int(3, 5);
Vector2Int vectorB = new Vector2Int(4, 2);
Vector2Int result = Vector2Int.Max(vectorA, vectorB);
// result is now (4, 5)