Allolib  1.0
C++ Components For Interactive Multimedia
al::Interval< T > Class Template Reference

A closed interval [min, max]. More...

#include <C:/Users/Andres/source/repos/casm_viewer/external/tinc/external/allolib/include/al/math/al_Interval.hpp>

Public Member Functions

 Interval (const T &min, const T &max)
 
center () const
 Returns center point.
 
bool contains (const T &v) const
 Returns true if value is in interval.
 
bool degenerate () const
 Returns true if diameter is zero.
 
diameter () const
 Returns absolute difference of endpoints.
 
size () const
 Returns absolute difference of endpoints.
 
const T & max () const
 Get maximum endpoint.
 
const T & min () const
 Get minimum endpoint.
 
bool proper () const
 Returns true if diameter is non-zero.
 
radius () const
 Returns one-half the diameter.
 
toUnit (const T &v) const
 Linearly map point in interval to point in the unit interval.
 
template<class U >
bool operator== (const Interval< U > &v)
 
template<class U >
bool operator!= (const Interval< U > &v)
 
template<class U >
Intervaloperator+= (const Interval< U > &v)
 
template<class U >
Intervaloperator-= (const Interval< U > &v)
 
template<class U >
Intervaloperator*= (const Interval< U > &v)
 
template<class U >
Intervaloperator/= (const Interval< U > &v)
 
Intervalcenter (const T &v)
 Set center point preserving diameter.
 
Intervaldiameter (const T &v)
 Set diameter (width) preserving center.
 
IntervalcenterDiameter (const T &c, const T &d)
 Set center and diameter.
 
Intervalendpoints (const T &min, const T &max)
 Set the endpoints.
 
Intervaltranslate (const T &v)
 Translate interval by fixed amount.
 
Intervalmax (const T &v)
 Set maximum endpoint.
 
Intervalmin (const T &v)
 Set minimum endpoint.
 

Detailed Description

template<class T>
class al::Interval< T >

A closed interval [min, max].

An interval is a connected region of the real line. Geometrically, it describes a 0-sphere. Order is strongly enforced so that the endpoints will always satisfy min <= max.

Definition at line 55 of file al_Interval.hpp.

Constructor & Destructor Documentation

◆ Interval()

template<class T >
al::Interval< T >::Interval ( const T &  min,
const T &  max 
)
inline
Parameters
[in]minminimum endpoint
[in]maxmaximum endpoint

Definition at line 61 of file al_Interval.hpp.


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