Skip to content

Commit

Permalink
STYLE: use itk::Math::abs instead of fabs
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikhail Polkovnikov committed Jul 2, 2022
1 parent 8df460e commit 9f910c8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/rtkThreeDCircularProjectionGeometry.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ rtk::ThreeDCircularProjectionGeometry::AddProjection(const PointType & sourcePo
const PointType & S = sourcePosition; // source pos
const PointType & R = detectorPosition; // detector pos

if (fabs(r * c) > 1e-6) // non-orthogonal row/column vectors
if (itk::Math::abs(r * c) > 1e-6) // non-orthogonal row/column vectors
return false;

// Euler angles (ZXY convention) from detector orientation in IEC-based WCS:
Expand Down Expand Up @@ -685,7 +685,7 @@ rtk::ThreeDCircularProjectionGeometry::VerifyAngles(const double outOfP

for (int i = 0; i < 3; i++) // check whether matrices match
for (int j = 0; j < 3; j++)
if (fabs(rm[i][j] - m[i][j]) > EPSILON)
if (itk::Math::abs(rm[i][j] - m[i][j]) > EPSILON)
return false;

return true;
Expand All @@ -700,7 +700,7 @@ rtk::ThreeDCircularProjectionGeometry::FixAngles(double & outOfPlan
const Matrix3x3Type & rm = referenceMatrix; // shortcut
const double EPSILON = 1e-6; // internal tolerance for comparison

if (fabs(fabs(rm[2][1]) - 1.) > EPSILON)
if (itk::Math::abs(itk::Math::abs(rm[2][1]) - 1.) > EPSILON)
{
double oa = NAN, ga = NAN, ia = NAN;

Expand Down

0 comments on commit 9f910c8

Please sign in to comment.