20 template <
typename TestType>
21 using isIntegerType =
typename std::enable_if<std::is_integral<TestType>::value,
bool>::type;
23 template <
typename TestType>
24 using isFloatType =
typename std::enable_if<std::is_floating_point<TestType>::value,
bool>::type;
26 template <
typename TestType>
27 using isSigned =
typename std::enable_if<std::is_signed<TestType>::value,
bool>::type;
29 template <
typename TestType>
30 using isUnsigned =
typename std::enable_if<!std::is_signed<TestType>::value,
bool>::type;
39 template <
typename DataType>
47 template <
typename TestType = DataType, isSigned<TestType> = true>
51 template <
typename TestType = DataType, isUn
signed<TestType> = true>
60 const DataType&
min()
const;
61 const DataType&
max()
const;
65 template <
typename TestType = DataType, isIntegerType<TestType> = true>
68 template <
typename TestType = DataType, isIntegerType<TestType> = true>
69 DataType
value(
const size_t index)
const;
82 Mapper(
const float& minInput,
const float& maxInput,
const float& minOutput,
const float& maxOutput);
126 Iterator(
int startValue,
int step);
127 Iterator(
int endValue);
160 template <
typename DataType>
161 static const DataType&
clamp(
const DataType& value,
const DataType&
min,
const DataType&
max);
165 template <
typename DataType>
166 static const DataType&
min(
const DataType& value1,
const DataType& value2);
170 template <
typename DataType>
171 static const DataType&
max(
const DataType& value1,
const DataType& value2);
178#include "XXRange.hpp"
#define XXCPP_DECLSPEC
Definition XXCppExportDef.h:23
void observe(const DataType &value)
test value and update min / max
void init(const DataType &value)
min and max to value
void reset()
min to datatype max and max to datatype min
DataType value(const size_t index) const
const DataType & min() const
const DataType & max() const
Mapper(const float &minInput, const float &maxInput, const float &minOutput, const float &maxOutput)
void setMaxInput(const float &value)
void setMinOutput(const float &value)
void setMaxOutput(const float &value)
float operator()(const float &input) const
void setMinInput(const float &value)
friend class Spread
Definition XXRange.h:130
std::ptrdiff_t difference_type
Definition XXRange.h:113
void pointer
Definition XXRange.h:115
bool operator==(const Iterator &other) const
bool operator!=(const Iterator &other) const
std::forward_iterator_tag iterator_category
Definition XXRange.h:112
int value_type
Definition XXRange.h:114
void reference
Definition XXRange.h:116
Spread(int min, int max, int step=1)
typename std::enable_if<!std::is_signed< TestType >::value, bool >::type isUnsigned
Definition XXRange.h:30
typename std::enable_if< std::is_signed< TestType >::value, bool >::type isSigned
Definition XXRange.h:27
typename std::enable_if< std::is_integral< TestType >::value, bool >::type isIntegerType
Definition XXRange.h:21
typename std::enable_if< std::is_floating_point< TestType >::value, bool >::type isFloatType
Definition XXRange.h:24
static const DataType & min(const DataType &value1, const DataType &value2)
return the minimum of two values
static const DataType & clamp(const DataType &value, const DataType &min, const DataType &max)
clamp a value to a range defined by a min and max value
static const DataType & max(const DataType &value1, const DataType &value2)
return the maximum of two values
Definition XXPopulatedAbstract.h:11