static Rotation FromRoll( float roll )

book_4_sparkGenerated
code_blocksInput

Description

The Rotation.FromRoll method creates a new Rotation instance representing a rotation around the roll axis. This method is useful when you need to create a rotation that only affects the roll component, leaving pitch and yaw unchanged.

Usage

To use the FromRoll method, call it with a single parameter specifying the roll angle in degrees. The method returns a Rotation object that can be used in various transformations or combined with other rotations.

Example

// Example of creating a rotation with a specific roll angle
float rollAngle = 45.0f; // Roll angle in degrees
Rotation rollRotation = Rotation.FromRoll(rollAngle);

// Use the rollRotation in your application
// For example, apply it to an object or combine with other rotations