WE Core
Loading...
Searching...
No Matches
ParameterDefinition Namespace Reference

Classes

class  BaseParameter
 
class  BooleanParameter
 
class  RangedParameter
 

Functions

template<class T >
BoundsCheck (T val, T min, T max)
 

Detailed Description

Contains classes that are used for defining parameters. Note that these are not intended to define individual parameters (and as such they will not store the current value of a parameter), but are intended to define some characteristics of a given type of parameter, such as the values that are valid for it and provide some methods for performing calculations relating to those characteristics.

Function Documentation

◆ BoundsCheck()

template<class T >
T ParameterDefinition::BoundsCheck ( T val,
T min,
T max )

If the given value is between the minimum and maximum values for this parameter, then the value is returned unchanged. If the given value is outside the minimum and maximum values for this parameter, the given value is clipped to this range and then returned.

Parameters
valValue to clip to minumum and maximum values
Returns
Clipped value

Definition at line 46 of file ParameterDefinition.h.

Referenced by ParameterDefinition::BaseParameter< T >::BoundsCheck().