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 measure of how much the rotation deviates from a neutral or 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 measure of how much the rotation deviates from a neutral or 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 in degrees.