Numerical interval.
More...
#include <stdex/interval.hpp>
|
T | start |
| interval start
|
|
T | end |
| interval end
|
|
template<class T>
struct stdex::interval< T >
Numerical interval.
◆ interval() [1/2]
Constructs a zero-size interval.
- Parameters
-
[in] | x | Interval start and end value |
◆ interval() [2/2]
Constructs an interval.
- Parameters
-
[in] | _start | Interval start value |
[in] | _end | Interval end value |
◆ contains()
Is value in interval?
- Parameters
-
- Returns
- true if x is in [start, end) or false otherwise
◆ empty()
Is interval empty?
- Returns
- true if interval is empty or false otherwise
◆ operator bool()
Is interval valid?
- Returns
- true if interval is valid or false otherwise
◆ operator!=()
Are intervals different?
- Parameters
-
[in] | other | Second interval to compare |
- Returns
- true if intervals are different or false otherwise
◆ operator+() [1/2]
Adds two intervals by components.
- Parameters
-
- Returns
- Resulting interval
◆ operator+() [2/2]
Moves interval towards the end by a number.
- Parameters
-
- Returns
- Moved interval
◆ operator++() [1/2]
Moves interval towards the end by one.
- Returns
- Moved interval
◆ operator++() [2/2]
Moves interval towards the end by one.
- Returns
- Original interval
◆ operator+=()
Moves interval towards the end by a number.
- Parameters
-
- Returns
- Resulting interval
◆ operator-() [1/2]
Subtracts two intervals by components.
- Parameters
-
- Returns
- Resulting interval
◆ operator-() [2/2]
Moves interval towards the beginning by a number.
- Parameters
-
- Returns
- Moved interval
◆ operator--() [1/2]
Moves interval towards the beginning by one.
- Returns
- Moved interval
◆ operator--() [2/2]
Moves interval towards the begginning by one.
- Returns
- Original interval
◆ operator-=()
Moves interval towards the beginning by a number.
- Parameters
-
- Returns
- Resulting interval
◆ operator==()
Are intervals identical?
- Parameters
-
[in] | other | Second interval to compare |
- Returns
- true if intervals are identical or false otherwise
◆ size()
Returns interval size.
- Returns
- Interval size or 0 if interval is invalid
The documentation for this struct was generated from the following file: