Vector3 ComponentMin( Vector3& other )

book_4_sparkGenerated
code_blocksInput

Description

The ComponentMin method of the Vector3 struct returns a new Vector3 where each component is the minimum of the corresponding components of the current vector and another vector provided as a parameter. This method is useful for component-wise comparison and selection of minimum values between two vectors.

Usage

To use the ComponentMin method, you need to have an instance of a Vector3 and another Vector3 to compare against. The method will return a new Vector3 with each component being the minimum of the two vectors' corresponding components.

Example

Vector3 vector1 = new Vector3(3.0f, 5.0f, 7.0f);
Vector3 vector2 = new Vector3(4.0f, 2.0f, 8.0f);

Vector3 result = vector1.ComponentMin(ref vector2);
// result is now (3.0f, 2.0f, 7.0f)