static Angles Lerp( Angles& source, Angles& target, float frac )

robot_2Generated
code_blocksInput

Description

The Angles.Lerp method performs a linear interpolation between two sets of Euler angles, source and target, based on a given fraction frac. This method is useful for smoothly transitioning between two orientations.

Usage

To use the Angles.Lerp method, provide the source and target angles as references, along with a fraction value between 0 and 1. The fraction determines the weight of the target angles in the interpolation. A fraction of 0 will return the source angles, while a fraction of 1 will return the target angles.

Example

// Example usage of Angles.Lerp
Angles source = new Angles(0, 0, 0);
Angles target = new Angles(90, 90, 90);
float fraction = 0.5f;

Angles result = Angles.Lerp(ref source, ref target, fraction);
// result will be an Angles object representing the midpoint between source and target angles.