FMath::WindRelativeAnglesDegrees

Given two angles in degrees, 'wind' the rotation in Angle1 so that it avoids >180 degree flips.

Windows
MacOS
Linux

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/Math/UnrealMathUtility.h

Include

#include "Math/UnrealMathUtility.h"

Source

/Engine/Source/Runtime/Core/Private/Math/UnrealMath.cpp

Syntax

static void WindRelativeAnglesDegrees
(
    float InAngle0,
    float & InOutAngle1
)

Remarks

Given two angles in degrees, 'wind' the rotation in Angle1 so that it avoids >180 degree flips. Good for winding rotations previously expressed as quaternions into a euler-angle representation.

Parameters

Parameter

Description

Angle0

The first angle that we wind relative to.

Angle1

The second angle that we may wind relative to the first.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss