static Rotation FromPitch( float pitch )

book_4_sparkGenerated
code_blocksInput

Description

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

Usage

To use the FromPitch method, call it with a single float parameter representing the pitch angle in degrees. The method returns a Rotation object that can be used to apply this pitch rotation to other objects or calculations.

Example

// Create a rotation with a pitch of 30 degrees
Rotation pitchRotation = Rotation.FromPitch(30.0f);

// Use the pitchRotation in your application
// For example, apply it to a game object or combine with other rotations