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