Struct thl::Range#

struct Range#

Collaboration diagram for thl::Range:

digraph { graph [bgcolor="#00000000"] node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2] edge [color="#1414CE"] "2" [label="thl::NormalizationCurve" tooltip="thl::NormalizationCurve"] "1" [label="thl::Range" tooltip="thl::Range" fillcolor="#BFBFBF"] "1" -> "2" [dir=forward tooltip="usage"] }

Public Functions

inline float to_normalized(float plain) const#
inline float from_normalized(float normalized) const#
inline float clamp(float v) const#
inline float wrap(float v) const#
inline float constrain(float v) const#
inline float snap(float plain) const#
inline bool is_linear() const#

Public Members

float m_min = 0.0f#
float m_max = 1.0f#
float m_step = 0.01f#
bool m_periodic = false#
NormalizationCurve m_curve#

Public Static Functions

static inline Range linear(float min, float max, float step = 0.01f)#
static inline Range power_law(float min, float max, float skew, float step = 0.01f)#
static inline Range custom(float min, float max, NormalizeCurve to_fn, NormalizeCurve from_fn, float step = 0.01f)#
static inline Range discrete(int min, int max, int step = 1)#
static inline Range boolean()#
static inline Range periodic(float min, float max, float step = 0.01f)#