Description
The Conjugate
property of the Rotation
struct returns the conjugate of the current rotation. The conjugate of a quaternion is obtained by negating its X, Y, and Z components while keeping the W component unchanged. This operation is useful in various mathematical computations involving rotations, such as finding the inverse of a rotation when the quaternion is normalized.
Usage
To use the Conjugate
property, simply access it from an instance of the Rotation
struct. This will return a new Rotation
instance representing the conjugate of the original rotation.
Example
// Example of using the Conjugate property
Rotation originalRotation = new Rotation(0.5f, 0.5f, 0.5f, 0.5f);
Rotation conjugateRotation = originalRotation.Conjugate;
// Output the conjugate rotation
// conjugateRotation will have its X, Y, Z components negated
Console.WriteLine($"Conjugate Rotation: {conjugateRotation}");