static Vector2Int Max( Vector2Int a, Vector2Int b )

book_4_sparkGenerated
code_blocksInput

Description

The Max method of the Vector2Int struct returns a new Vector2Int instance where each component is the maximum of the corresponding components of the two input vectors. This method is useful for comparing two vectors and creating a new vector that represents the maximum bounds of the two.

Usage

To use the Max method, call it with two Vector2Int instances as parameters. The method will return a new Vector2Int where each component is the maximum of the two input vectors' components.

Example

Vector2Int vectorA = new Vector2Int(3, 5);
Vector2Int vectorB = new Vector2Int(4, 2);
Vector2Int maxVector = Vector2Int.Max(vectorA, vectorB);
// maxVector is now (4, 5)