float w { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The w property of the Rotation struct represents the W component of the rotation. This component is part of the quaternion representation of the rotation, which includes the X, Y, Z, and W components. The W component specifically represents the rotation around the normal defined by the X, Y, and Z components.

Usage

Use the w property to access or modify the W component of a Rotation instance. This is useful when you need to work directly with the quaternion representation of a rotation, such as when performing complex mathematical operations or interfacing with systems that require quaternion inputs.

Example

// Example of accessing the W component of a Rotation
Rotation rotation = new Rotation();
float wComponent = rotation.w;

// Example of setting the W component of a Rotation
rotation.w = 0.5f;