App: Use std::numeric_limits and std::numbers instead of defines
This commit is contained in:
@@ -1250,7 +1250,7 @@ void PropertyFloatConstraint::setPyObject(PyObject* value)
|
||||
|
||||
double stepSize = valConstr[3];
|
||||
// need a value > 0
|
||||
if (stepSize < DBL_EPSILON) {
|
||||
if (stepSize < std::numeric_limits<double>::epsilon()) {
|
||||
throw Base::ValueError("Step size must be greater than zero");
|
||||
}
|
||||
|
||||
@@ -1282,7 +1282,8 @@ TYPESYSTEM_SOURCE(App::PropertyPrecision, App::PropertyFloatConstraint)
|
||||
//**************************************************************************
|
||||
// Construction/Destruction
|
||||
//
|
||||
const PropertyFloatConstraint::Constraints PrecisionStandard = {0.0, DBL_MAX, 0.001};
|
||||
const PropertyFloatConstraint::Constraints PrecisionStandard = {
|
||||
0.0, std::numeric_limits<double>::max(), 0.001};
|
||||
|
||||
PropertyPrecision::PropertyPrecision()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user