 
                 iter += 1
             }
-
-            let pixel = pixelY * imageWidth + pixelX
 
             if iter < maxIterations {
                 iterationsHistogram[iter] += 1  // iter: 1 .. maxIterations-1, no need to count iterationsHistogram[max_iterations]

        iterationsHistogram[i] = 0
    }

    for pixelY in 0 ..< imageHeight {
        let y0 = lerp(yTop, yBottom, Double(pixelY) / Double(imageHeight))


            } else {
                resultsPerPoint[pixel] = CalculationResult(iter: 0, distanceToNextIteration: 0.0)
            }

            pixel += 1
        }
    }
}
