18 static ElementType
Max()
201 return ElementType();
214 return ElementType();
229 return ElementType();
245 if (
A.IsValid() &&
B.IsValid())
247 return TInterval(FMath::Max(
A.Min,
B.Min), FMath::Min(
A.Max,
B.Max));
262 return Ar << Interval.
Min << Interval.
Max;
280#define DEFINE_INTERVAL_WRAPPER_STRUCT(Name, ElementType) \
281 struct Name : TInterval<ElementType> \
284 typedef TInterval<ElementType> Super; \
292 Name( const Super& Other ) \
297 Name( ElementType InMin, ElementType InMax ) \
298 : Super( InMin, InMax ) \
302 friend Name Intersect( const Name& A, const Name& B ) \
304 return Intersect( static_cast<const Super&>( A ), static_cast<const Super&>( B ) ); \
309 struct TIsBitwiseConstructible<Name, TInterval<ElementType>> \
311 enum { Value = true }; \
315 struct TIsBitwiseConstructible<TInterval<ElementType>, Name> \
317 enum { Value = true }; \
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define DEFINE_INTERVAL_WRAPPER_STRUCT(Name, ElementType)
Definition Interval.h:280
constexpr uint32 HashCombine(uint32 A, uint32 C)
Definition TypeHash.h:36
Definition Archive.h:1208
static constexpr auto GetRangePct(T MinValue, T MaxValue, T2 Value)
Definition UnrealMathUtility.h:1047
static constexpr UE_FORCEINLINE_HINT T Clamp(const T X, const T MinValue, const T MaxValue)
Definition UnrealMathUtility.h:592
static ElementType Max()
Definition Interval.h:18
static ElementType Lowest()
Definition Interval.h:23
friend TInterval Intersect(const TInterval &A, const TInterval &B)
Definition Interval.h:243
ElementType GetRangePct(ElementType X) const
Definition Interval.h:225
void operator-=(ElementType X)
Definition Interval.h:84
ElementType Clamp(ElementType X) const
Definition Interval.h:210
bool IsValid() const
Definition Interval.h:132
void Expand(ElementType ExpandAmount)
Definition Interval.h:153
TInterval(ElementType InMin, ElementType InMax)
Definition Interval.h:58
bool Contains(const ElementType &Element) const
Definition Interval.h:143
friend uint32 GetTypeHash(const TInterval &Interval)
Definition Interval.h:271
TInterval()
Definition Interval.h:47
void operator+=(ElementType X)
Definition Interval.h:70
friend class FArchive & operator<<(class FArchive &Ar, TInterval &Interval)
Definition Interval.h:260
ElementType Max
Definition Interval.h:38
ElementType Min
Definition Interval.h:35
ElementType Interpolate(float Alpha) const
Definition Interval.h:194
ElementType Size() const
Definition Interval.h:122
bool operator!=(const TInterval &Other) const
Definition Interval.h:110
bool operator==(const TInterval &Other) const
Definition Interval.h:99
void Include(ElementType X)
Definition Interval.h:167
Definition IsArithmetic.h:12
Definition NumericLimits.h:41