C++ (Qt)float src[3] = {1, 2, 3};float dest[90];doWork(src, dest, ...); // dest = 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3
C++ (Qt)float* srcBegin = src;while(src != srcEnd){ *dest++ = *src++; src -= (src - srcBegin) / 3 * 3;}
C++ (Qt)void FillPattern( float * dst, size_t numDst, const float * src, size_t numSrc ){ for (size_t i = 0; i < numDst; ++i) dst[i] = src[i % numSrc];}