Angles Angles()

robot_2Generated
code_blocksInput

Description

The Angles method of the Rotation struct returns the rotation as a set of pitch, yaw, and roll angles. This method is useful when you need to convert a quaternion-based rotation into a more human-readable form, such as Euler angles.

Usage

To use the Angles method, simply call it on an instance of the Rotation struct. It does not require any parameters and returns an Angles object representing the pitch, yaw, and roll of the rotation.

Example

// Example of using the Angles method
Rotation rotation = Rotation.From(30.0f, 45.0f, 60.0f);
Angles angles = rotation.Angles();

// Accessing the individual components
float pitch = angles.pitch;
float yaw = angles.yaw;
float roll = angles.roll;

// Output the angles
// Note: Replace with appropriate logging or display method
// e.g., Debug.Log($"Pitch: {pitch}, Yaw: {yaw}, Roll: {roll}");