14 assert(fullSize > 0 && fullSize % 2 == 0);
16 index = index % fullSize;
18 index = fullSize - (-index % fullSize);
19 if (index > fullSize / 2)
20 index = fullSize - index;
constexpr auto MapToPositiveHalfIndex(int index, int fullSize)
Useful when dealing with symmetric spectra reduced only to their positive half. See tests below for m...