19#ifndef CORE_ALGORITHM_PERIODIC_FOLD_HPP
20#define CORE_ALGORITHM_PERIODIC_FOLD_HPP
44template <FloatingPo
intOrRef T, IntegralOrRef I>
46 using limits = std::numeric_limits<I>;
48 while ((x < T{0}) && (i > limits::min())) {
53 while ((x >= l) && (i < limits::max())) {
71 if (std::isnan(x) or std::isnan(l) or std::isinf(x) or (l == 0)) {
std::pair< T, I > periodic_fold(T x, I i, T const l)
Fold value into primary interval.