static Rotation FromPitch( float pitch )

robot_2Generated
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 parameter representing the pitch angle in degrees. The method returns a Rotation object that can be used to apply pitch rotation to objects or combine with other rotations.

Example

// Example of using Rotation.FromPitch
float pitchAngle = 45.0f; // Pitch angle in degrees
Rotation pitchRotation = Rotation.FromPitch(pitchAngle);

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