assert(intervalSize > 0 && height > 0 && width > 0 && from > 0);
intensityMap.resize(width * height, 0);
for (complex<T> c = from; c.imag() < to.imag(); c.imag(c.imag() + 1)) {
for (; c.real() < to.real(); c.real(c.real() + 1)) {
for (auto i = 0; i < intervalSize; i++) {
complex<T> g(i, i);
complex<T> result = g / c;
auto imagPart = result.imag();
if (imagPart == 0) {
intensityMap.at(c.imag() * width + c.real())++;
}
}
}
}
}
Many times certainly not. Don't forget that you could just accept an easy job for a while.