The Inverse
property of the Vector3
struct returns the inverse of the vector. This is particularly useful for operations that involve scaling vectors, as it effectively negates each component of the vector.
The Inverse
property of the Vector3
struct returns the inverse of the vector. This is particularly useful for operations that involve scaling vectors, as it effectively negates each component of the vector.
To use the Inverse
property, simply access it on an instance of a Vector3
object. This will return a new Vector3
where each component is the inverse of the original vector's components.
Vector3 originalVector = new Vector3(2.0f, -3.0f, 4.0f); Vector3 inverseVector = originalVector.Inverse; // inverseVector is now (-2.0f, 3.0f, -4.0f)