IDS peak IPL v1.18.0
Loading...
Searching...
No Matches
peak::ipl::Interval< T > Class Template Reference

Interval support and convenience class. More...

#include <peak_ipl/types/peak_ipl_interval.hpp>

Public Member Functions

constexpr Interval (T start, T end)
 Constructor for the interval.
constexpr T Start () const
 Get the start value (inclusive) for the interval.
constexpr T End () const
 Get the end value (inclusive) for the interval.
constexpr bool InInterval (T value) const
 Check if the value is in the interval.

Detailed Description

template<typename T>
class peak::ipl::Interval< T >

Interval support and convenience class.

Since
1.15

Constructor & Destructor Documentation

◆ Interval()

template<typename T>
peak::ipl::Interval< T >::Interval ( T start,
T end )
inlineconstexpr

Constructor for the interval.

Parameters
startThe start value (inclusive) for the interval.
endThe end value (inclusive) for the interval.
Exceptions
InvalidArgumentExceptionThe end must be greater than start

Member Function Documentation

◆ End()

template<typename T>
T peak::ipl::Interval< T >::End ( ) const
inlineconstexpr

Get the end value (inclusive) for the interval.

Returns
the end value.
Since
1.15

◆ InInterval()

template<typename T>
bool peak::ipl::Interval< T >::InInterval ( T value) const
inlineconstexpr

Check if the value is in the interval.

Parameters
valueThe value to check.
Returns
true if in the interval, false otherwise.
Since
1.15

◆ Start()

template<typename T>
T peak::ipl::Interval< T >::Start ( ) const
inlineconstexpr

Get the start value (inclusive) for the interval.

Returns
the start value.
Since
1.15

The documentation for this class was generated from the following file: