Vector3 Inverse { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The Inverse property of the Vector3Int struct returns the inverse of the current vector. This is particularly useful for operations that involve scaling vectors. Note that the result is a Vector3 and not a Vector3Int, as the inverse operation may result in non-integer values.

Usage

To use the Inverse property, simply access it from an instance of Vector3Int. This will return a Vector3 where each component is the reciprocal of the corresponding component in the original vector.

Example

Vector3Int vector = new Vector3Int(2, 3, 4);
Vector3 inverseVector = vector.Inverse;
// inverseVector is now (0.5, 0.3333, 0.25)