Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
TCustomLerp< T > Struct Template Reference

#include <UnrealMathUtility.h>

Static Public Attributes

static constexpr bool Value = false
 

Detailed Description

template<typename T>
struct TCustomLerp< T >

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. } };

Definition at line 251 of file UnrealMathUtility.h.

Member Data Documentation

◆ Value

template<typename T >
constexpr bool TCustomLerp< T >::Value = false
staticconstexpr

Definition at line 253 of file UnrealMathUtility.h.


The documentation for this struct was generated from the following file: