![]() |
Castor3D 0.17.0
Multiplatform 3D engine
|
A range class. More...
#include <Range.hpp>

Public Member Functions | |
| Range (T const &min, T const &max) noexcept | |
| Constructor. | |
| T const & | clamp (T const &value) const noexcept |
| Puts a value in the range. | |
| bool | has (T const &value) const noexcept |
| float | percent (T const &value) const noexcept |
| Gives the percentage matching the given value. | |
| float | invPercent (T const &value) const noexcept |
| Gives the percentage matching the given value. | |
| T | value (float const &percent) const noexcept |
| Gives the value matching the given percentage. | |
| T | invValue (float const &percent) const noexcept |
| Gives the value matching the given percentage. | |
| T const & | getMin () const noexcept |
| T const & | getMax () const noexcept |
A range class.
|
inlinenoexcept |
Constructor.
| [in] | min,max | The range. |
|
inlinenoexcept |
Puts a value in the range.
| [in] | value | The value. |
m_min if value is less than it.m_max if value is greater than it.value otherwise. References castor::Range< T >::value().
Referenced by castor::Range< T >::percent().


|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
true if value is inside the range. References castor::Range< T >::value().

|
inlinenoexcept |
Gives the percentage matching the given value.
| [in] | value | The value. |
value <= m_min.value >= m_max.m_max or from m_min. References castor::Range< T >::percent(), and castor::Range< T >::value().

|
inlinenoexcept |
Gives the value matching the given percentage.
| [in] | percent | The percentage. |
m_max if percent <= 0.0.m_min if percent >= 1.0.m_min and m_max. References castor::Range< T >::percent().

|
inlinenoexcept |
Gives the percentage matching the given value.
| [in] | value | The value. |
value <= m_min.value >= m_max.m_min or from m_max. References castor::Range< T >::clamp(), and castor::Range< T >::value().
Referenced by castor::Range< T >::invPercent(), castor::Range< T >::invValue(), and castor::Range< T >::value().


|
inlinenoexcept |
Gives the value matching the given percentage.
| [in] | percent | The percentage. |
m_min if percent <= 0.0.m_max if percent >= 1.0.m_min and m_max. References castor::Range< T >::percent().
Referenced by castor::Range< T >::clamp(), castor::RangeSequenceT< T >::getRange(), castor::Range< T >::has(), castor::Range< T >::invPercent(), and castor::Range< T >::percent().

