Description
The Normal
property of the Angles
struct provides a normalized version of the angles. This means that each axis of the angle is adjusted to fall within the range of (-180, 180] degrees. Normalizing angles is useful for ensuring that angle values are within a standard range, which can help prevent issues with calculations that involve angles.
Usage
To use the Normal
property, simply access it from an instance of the Angles
struct. This will return a new Angles
object with each component normalized.
Example
// Example of using the Normal property
Angles angles = new Angles(270, 450, -720);
Angles normalizedAngles = angles.Normal;
// normalizedAngles will have values within the range (-180, 180]
// For this example, normalizedAngles would be equivalent to Angles(90, 90, 0)