From e03dfe392b988020109decbb67032c65667924e7 Mon Sep 17 00:00:00 2001 From: rlagneau Date: Tue, 31 Oct 2023 09:45:59 +0100 Subject: [PATCH] Renamed the moduloFloat and moduloDouble methods into modulo --- modules/core/include/visp3/core/vpMath.h | 4 ++-- modules/core/src/image/vpImageCircle.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/core/include/visp3/core/vpMath.h b/modules/core/include/visp3/core/vpMath.h index 17bbbe6235..c321b18266 100644 --- a/modules/core/include/visp3/core/vpMath.h +++ b/modules/core/include/visp3/core/vpMath.h @@ -172,7 +172,7 @@ class VISP_EXPORT vpMath * \param[in] modulo The divider. * \return float The rest as in a modulo operation. */ - static float moduloFloat(const float &value, const float &modulo) + static float modulo(const float &value, const float &modulo) { float quotient = std::floor(value / modulo); float rest = value - quotient * modulo; @@ -187,7 +187,7 @@ class VISP_EXPORT vpMath * \param[in] modulo The divider. * \return double The rest as in a modulo operation. */ - static double moduloDouble(const double &value, const double &modulo) + static double modulo(const double &value, const double &modulo) { double quotient = std::floor(value / modulo); double rest = value - quotient * modulo; diff --git a/modules/core/src/image/vpImageCircle.cpp b/modules/core/src/image/vpImageCircle.cpp index fd9ed329ec..dfd8b6d7c3 100644 --- a/modules/core/src/image/vpImageCircle.cpp +++ b/modules/core/src/image/vpImageCircle.cpp @@ -1003,7 +1003,7 @@ float vpImageCircle::computeAngularCoverageInRoI(const vpRect &roi, const float } if (delta_theta < 0 || delta_theta > 2.f * M_PIf) { // Needed since M_PIf is used - float rest = vpMath::moduloFloat(delta_theta, 2.f * M_PIf); + float rest = vpMath::modulo(delta_theta, 2.f * M_PIf); if (rest < roundingTolerance && (delta_theta < -M_PIf || delta_theta > M_PIf)) { // If the angle is a negative multiple of 2.f * M_PIf we consider it to be 2.f * M_PIf delta_theta = 2.f * M_PIf;