20 const double lmin = std::numeric_limits<double>::lowest();
21 const double lmax = std::numeric_limits<double>::max();
22 const double poszero = std::numeric_limits<double>::min();
28 : m_has_lower_limit(false), m_has_upper_limit(false), m_lower_limit(lmin), m_upper_limit(lmax)
34 : m_has_lower_limit(has_lower_limit)
35 , m_has_upper_limit(has_upper_limit)
36 , m_lower_limit(lower_limit)
37 , m_upper_limit(upper_limit)
43 return RealLimits(
true,
false, bound_value, lmax);
58 return RealLimits(
false,
true, lmin, bound_value);
63 return RealLimits(
true,
true, left_bound_value, right_bound_value);
117 return !(*
this == other);
static RealLimits limitless()
Creates an object withoud bounds (default)
static RealLimits upperLimited(double bound_value)
Creates an object bounded from the right.
bool isLowerLimited() const
bool operator==(const RealLimits &other) const
bool hasUpperLimit() const
if has upper limit
static RealLimits lowerLimited(double bound_value)
Creates an object bounded from the left.
bool hasLowerAndUpperLimits() const
if has lower and upper limit
static RealLimits positive()
Creates an object which can have only positive values (>0., zero is not included)
double m_lower_limit
parameter has upper bound
bool m_has_upper_limit
parameter has lower bound
bool isInRange(double value) const
returns true if proposed value is in limits range
double upperLimit() const
Returns upper limit.
double lowerLimit() const
Returns lower limit.
bool operator<(const RealLimits &other) const
bool isNonnegative() const
bool operator!=(const RealLimits &other) const
static RealLimits nonnegative()
Creates an object which can have only positive values with 0. included.
bool isUpperLimited() const
static RealLimits limited(double left_bound_value, double right_bound_value)
Creates an object bounded from the left and right.
bool hasLowerLimit() const
if has lower limit
double m_upper_limit
minimum allowed value
materialitems.h Collection of materials to populate MaterialModel.