#2315. Replaced abs() by fabs() where relevant

This commit is contained in:
Bjørn Erik Jensen
2018-01-05 09:29:53 +01:00
parent 0f30433286
commit 4cdc109ec3
7 changed files with 16 additions and 16 deletions

View File

@@ -120,7 +120,7 @@ void RimFractureTemplate::fieldChangedByUi(const caf::PdmFieldHandle* changedFie
{
if (fracture->fractureTemplate() == this)
{
if (changedField == &azimuthAngle && (abs(oldValue.toDouble() - fracture->azimuth()) < 1e-5))
if (changedField == &azimuthAngle && (fabs(oldValue.toDouble() - fracture->azimuth()) < 1e-5))
{
fracture->azimuth = azimuthAngle;
}
@@ -152,15 +152,15 @@ void RimFractureTemplate::fieldChangedByUi(const caf::PdmFieldHandle* changedFie
{
if (fracture->fractureTemplate() == this)
{
if (changedField == &perforationLength && (abs(oldValue.toDouble() - fracture->perforationLength()) < 1e-5))
if (changedField == &perforationLength && (fabs(oldValue.toDouble() - fracture->perforationLength()) < 1e-5))
{
fracture->perforationLength = perforationLength;
}
if (changedField == &perforationEfficiency && (abs(oldValue.toDouble() - fracture->perforationEfficiency()) < 1e-5))
if (changedField == &perforationEfficiency && (fabs(oldValue.toDouble() - fracture->perforationEfficiency()) < 1e-5))
{
fracture->perforationEfficiency = perforationEfficiency;
}
if (changedField == &wellDiameter && (abs(oldValue.toDouble() - fracture->wellDiameter()) < 1e-5))
if (changedField == &wellDiameter && (fabs(oldValue.toDouble() - fracture->wellDiameter()) < 1e-5))
{
fracture->wellDiameter = wellDiameter;
}