Tag Archives: complex numbers

complex numbers – the code

// see the last post “using complex numbers” for more details class Complex{   float x,y;   Complex(float xp,float yp){     x=xp;     y=yp;   }   // addition     Complex add(Complex two){     return new Complex(x+two.x,y+two.y);   }   … Continue reading

Posted in programming | Tagged , , | Leave a comment

Using complex numbers

For complex functions f(z) needed to create fractals we could calculate the real and imaginary part separately using basic arithmetic with float numbers. But this is hard to do and may cause many programming errors. It is better to use … Continue reading

Posted in programming | Tagged , , , | Leave a comment