Navigation
API > API/Runtime > API/Runtime/Core
Template for numeric interval
| Name | TInterval |
| Type | struct |
| Header File | /Engine/Source/Runtime/Core/Public/Math/Interval.h |
| Include Path | #include "Math/Interval.h" |
Syntax
template<typename ElementType>
struct TInterval
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TInterval () |
Default constructor.The interval is invalid | Math/Interval.h | |
TInterval
(
ElementType InMin, |
Creates and initializes a new interval with the specified lower and upper bounds. | Math/Interval.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Max | ElementType | Holds the upper bound of the interval. | Math/Interval.h | |
| Min | ElementType | Holds the lower bound of the interval. | Math/Interval.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
ElementType Clamp
(
ElementType X |
Clamps X to be between the interval inclusively. | Math/Interval.h | |
bool Contains
(
const ElementType& Element |
Checks whether this interval contains the specified element. | Math/Interval.h | |
void Expand
(
ElementType ExpandAmount |
Expands this interval to both sides by the specified amount. | Math/Interval.h | |
ElementType GetRangePct
(
ElementType X |
Calculate the Percentage of X in the Interval | Math/Interval.h | |
void Include
(
ElementType X |
Expands this interval if necessary to include the specified element. | Math/Interval.h | |
ElementType Interpolate
(
float Alpha |
Interval interpolation | Math/Interval.h | |
bool IsValid() |
Whether interval is valid (Min <= Max). | Math/Interval.h | |
ElementType Size() |
Computes the size of this interval. | Math/Interval.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool operator!=
(
const TInterval& Other |
Compare two intervals for inequality. | Math/Interval.h | |
void operator+=
(
ElementType X |
Offset the interval by adding X. | Math/Interval.h | |
void operator-=
(
ElementType X |
Offset the interval by subtracting X. | Math/Interval.h | |
bool operator==
(
const TInterval& Other |
Compare two intervals for equality. | Math/Interval.h |