Navigation
API > API/Runtime > API/Runtime/Core > API/Runtime/Core/Math > API/Runtime/Core/Math/FMath > API/Runtime/Core/Math/FMath/ClampAngle
References
| Module | Core |
| Header | /Engine/Source/Runtime/Core/Public/Math/UnrealMathUtility.h |
| Include | #include "Math/UnrealMathUtility.h" |
| Source | /Engine/Source/Runtime/Core/Public/Math/Rotator.h |
template<typename T>
static T ClampAngle
&40;
T AngleDegrees,
T MinAngleDegrees,
T MaxAngleDegrees
&41;
Remarks
Clamps an arbitrary angle to be between the given angles. Will clamp to nearest boundary. Returns clamped angle in the range -180..180.
Parameters
| Name | Description |
|---|---|
| MinAngleDegrees | "from" angle that defines the beginning of the range of valid angles (sweeping clockwise) |
| MaxAngleDegrees | "to" angle that defines the end of the range of valid angles |