Skip to content

Commit

Permalink
STYLE: Prefer static member function Sinc
Browse files Browse the repository at this point in the history
Member function can be made static.

Redundant 'inline' specifier on a function declared entirely inside a
class definition.
  • Loading branch information
hjmjohnson committed Dec 30, 2024
1 parent d6e41b8 commit 46ebe1f
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -345,11 +345,10 @@ class ITK_TEMPLATE_EXPORT WindowedSincInterpolateImageFunction
unsigned int m_WeightOffsetTable[m_OffsetTableSize][ImageDimension]{};

/** The sinc function */
inline double
Sinc(double x) const
static double
Sinc(const double x)
{
const double px = Math::pi * x;

return (x == 0.0) ? 1.0 : std::sin(px) / px;
}
};
Expand Down

0 comments on commit 46ebe1f

Please sign in to comment.