static Rotation From( Angles angles )
static Rotation From( float pitch, float yaw, float roll )

book_4_sparkGenerated
code_blocksInput

Description

The Rotation.From method creates a Rotation instance from a given set of Angles. This method is useful for converting angle-based rotations into quaternion-based rotations, which are often used in 3D graphics and physics calculations due to their ability to represent rotations without suffering from gimbal lock.

Usage

To use the Rotation.From method, pass an Angles object as a parameter. The method will return a Rotation object that represents the same rotation as the input angles.

Example

// Example of using Rotation.From with Angles
Angles angles = new Angles(30, 45, 60);
Rotation rotation = Rotation.From(angles);

// The rotation now represents a rotation of 30 degrees pitch, 45 degrees yaw, and 60 degrees roll.