static Vector3 Max( Vector3& a, Vector3& b )

book_4_sparkGenerated
code_blocksInput

Description

The Vector3.Max method is a static method that returns a new Vector3 instance, where each component is the maximum value of the corresponding components of the two input vectors a and b. This method is useful for determining the component-wise maximum of two vectors.

Usage

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.

Example

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)