The Vector3.Max
method returns a new Vector3
instance where each component is the maximum value of the corresponding components of two input vectors a
and b
. This method is useful for determining the component-wise maximum of two vectors.
The Vector3.Max
method returns a new Vector3
instance where each component is the maximum value of the corresponding components of two input vectors a
and b
. This method is useful for determining the component-wise maximum of two vectors.
To use the Vector3.Max
method, pass two Vector3
references as parameters. The method will return a new Vector3
where each component is the maximum of the corresponding components of the input vectors.
Vector3 vectorA = new Vector3(1.0f, 3.0f, 5.0f); Vector3 vectorB = new Vector3(2.0f, 2.0f, 6.0f); Vector3 maxVector = Vector3.Max(ref vectorA, ref vectorB); // maxVector is now (2.0f, 3.0f, 6.0f)