The Angle
method of the Rotation
struct returns the turn length of the current rotation from the identity rotation, expressed in degrees. This method provides a way to determine how much a rotation deviates from the default orientation.
The Angle
method of the Rotation
struct returns the turn length of the current rotation from the identity rotation, expressed in degrees. This method provides a way to determine how much a rotation deviates from the default orientation.
To use the Angle
method, simply call it on an instance of the Rotation
struct. It does not require any parameters and returns a float
representing the angle in degrees.
// Example of using the Angle method Rotation rotation = Rotation.FromAxis(new Vector3(0, 1, 0), 45); float angle = rotation.Angle(); // angle should be 45.0f, representing the rotation from the identity rotation in degrees.