TInterval

Template for numeric interval

Windows
MacOS
Linux

Inheritance Hierarchy

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

Name Description

Public variable

ElementType

 

Max

Holds the upper bound of the interval.

Public variable

ElementType

 

Min

Holds the lower bound of the interval.

Constructors

Name Description

Public function

TInterval()

Default constructor.

The interval is invalid

Public function

TInterval

(
    ElementType InMin,
    ElementType InMax
)

Creates and initializes a new interval with the specified lower and upper bounds.

Functions

Name Description

Public function Const

bool

 

Contains

(
    const ElementType& Element
)

Checks whether this interval contains the specified element.

Public function

void

 

Expand

(
    ElementType ExpandAmount
)

Expands this interval to both sides by the specified amount.

Public function

void

 

Include

(
    ElementType X
)

Expands this interval if necessary to include the specified element.

Public function Const

ElementType

 

Interpolate

(
    float Alpha
)

Interval interpolation

Public function Const

bool

 

IsValid()

Whether interval is valid (Min <= Max).

Public function Const

ElementType

 

Size()

Computes the size of this interval.

Operators

Name Description

Public function

void

 

operator+=

(
    ElementType X
)

Offset the interval by adding X.

Public function

void

 

operator-=

(
    ElementType X
)

Offset the interval by subtracting X.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss