Description
The Vector2.Max
method returns a new Vector2
instance where each component is the maximum of the corresponding components of the two input vectors. This method is useful for determining the component-wise maximum between two vectors, which can be used in various mathematical and graphical computations.
Usage
To use the Vector2.Max
method, provide two Vector2
instances as parameters. The method will return a new Vector2
where each component is the greater of the two corresponding components from the input vectors.
Example
Vector2 vectorA = new Vector2(1.0f, 3.0f);
Vector2 vectorB = new Vector2(2.0f, 2.0f);
Vector2 result = Vector2.Max(vectorA, vectorB);
// result is now (2.0f, 3.0f)