Returns the inverse of this vector, which is useful for scaling vectors. Keep in mind this returns a Vector3
and not a Vector3Int
.
Returns the inverse of this vector, which is useful for scaling vectors. Keep in mind this returns a Vector3
and not a Vector3Int
.
To use the Inverse
property, simply access it from an instance of Vector3Int
. This will provide a Vector3
where each component is the reciprocal of the corresponding component in the original vector, assuming the component is not zero.
Vector3Int myVector = new Vector3Int(2, 3, 4); Vector3 inverseVector = myVector.Inverse; // inverseVector is now (0.5, 0.3333, 0.25)