Navigation
API > API/Runtime > API/Runtime/Core > API/Runtime/Core/Math
References
| Module | Core |
| Header | /Engine/Source/Runtime/Core/Public/Math/UnrealMathUtility.h |
| Include | #include "Math/UnrealMathUtility.h" |
Syntax
template<typename T>
struct TCustomLerp
Remarks
Template helper for FMath::Lerp<>() and related functions. By default, any type T is assumed to not need a custom Lerp implementation (Value=false). However a class that requires custom functionality (eg FQuat) can specialize the template to define Value=true and implement the Lerp() function and other similar functions and provide a custom implementation. Example:
template<> struct TCustomLerp< MyClass > { // Required to use our custom Lerp() function below. enum { Value = true };
// Implements for float Alpha param. You could also add overrides or make it a template param. static inline MyClass Lerp(const MyClass& A, const MyClass& B, const float& Alpha) { return MyClass::Lerp(A, B, Alpha); // Or do the computation here directly. } };
Specializations
TCustomLerp< VectorRegister4Double >
TCustomLerp< VectorRegister4Float >
Constants
| Name | Description |
|---|---|
| Value |