Rotation Inverse { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The Inverse property of the Rotation struct returns the inverse of the current rotation. The inverse of a rotation is a rotation that, when applied after the original rotation, results in no net rotation. This is useful for undoing a rotation or for calculating relative rotations.

Usage

To use the Inverse property, simply access it on an instance of a Rotation object. This will return a new Rotation object that represents the inverse of the original rotation.

Example

// Create a rotation from an axis and angle
Rotation rotation = Rotation.FromAxis(new Vector3(0, 1, 0), 90);

// Get the inverse of the rotation
Rotation inverseRotation = rotation.Inverse;

// Use the inverse rotation
// For example, applying the inverse rotation after the original rotation
// should result in no net rotation
Rotation result = rotation * inverseRotation;

// result should be equivalent to Rotation.Identity