Vector3Int ComponentMax( Vector3Int other )

book_4_sparkGenerated
code_blocksInput

Description

The ComponentMax method of the Vector3Int struct returns a new Vector3Int where each component is the maximum of the corresponding components of the current vector and another specified vector. This method is useful for comparing two vectors and creating a new vector that represents the maximum values of each component.

Usage

To use the ComponentMax method, call it on an instance of Vector3Int and pass another Vector3Int as a parameter. The method will return a new Vector3Int with each component being the maximum of the two vectors' components.

Example

Vector3Int vector1 = new Vector3Int(1, 5, 3);
Vector3Int vector2 = new Vector3Int(4, 2, 6);

Vector3Int result = vector1.ComponentMax(vector2);
// result is now (4, 5, 6)