Navigation
API > API/Runtime > API/Runtime/Core > API/Runtime/Core/FMath
Description
Smooths a value using exponential damping towards a target. Works for any type that supports basic arithmetic operations.
An approximation is used that is accurate so long as InDeltaTime < 0.5 * InSmoothingTime
| Name | ExponentialSmoothingApprox |
| Type | function |
| Header File | /Engine/Source/Runtime/Core/Public/Math/UnrealMathUtility.h |
| Include Path | #include "Math/UnrealMathUtility.h" |
template<class T>
static void ExponentialSmoothingApprox
(
T & InOutValue,
const T & InTargetValue,
const float InDeltaTime,
const float InSmoothingTime
)
Parameters
| Name | Remarks |
|---|---|
| InOutValue | The value to be smoothed |
| InTargetValue | The target to smooth towards |
| InDeltaTime | Time interval |
| InSmoothingTime | Timescale over which to smooth. Larger values result in more smoothed behaviour. Can be zero. |