App: Use std::numeric_limits and std::numbers instead of defines

This commit is contained in:
Benjamin Nauck
2025-03-27 11:47:55 +01:00
parent db8b58f73e
commit 81e0b408fa
10 changed files with 59 additions and 59 deletions

View File

@@ -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()
{