float Roll()

book_4_sparkGenerated
code_blocksInput

Description

The Roll method of the Rotation struct returns the roll component of the rotation. The roll is the rotation around the forward axis of the object, typically represented in degrees.

Usage

To retrieve the roll component of a Rotation instance, simply call the Roll method on the instance. This method does not take any parameters and returns a float representing the roll angle in degrees.

Example

// Example of using the Roll method
Rotation rotation = Rotation.From(30.0f, 45.0f, 60.0f);
float roll = rotation.Roll();
// roll now contains the roll component of the rotation, which is 60.0f in this case.