some more comments

This commit is contained in:
Nikola
2026-07-19 20:43:49 +02:00
parent 5a2f18845c
commit ade0294ec6
4 changed files with 17 additions and 12 deletions
+2
View File
@@ -212,10 +212,12 @@ static unsigned converge(float c_real, float c_imag, unsigned n) {
float real2 = real * real;
float imag2 = imag * imag;
// If the pixel has diverged calculate the value and return it
if (real2 + imag2 > 4.0f) {
return 255 - 4 * (i % 64);
}
// Calculate imaginary and real parts separately
imag = -2.0f * real * imag + c_imag;
real = real2 - imag2 + c_real;
}