I am having a go at a small program to draw a fractal, though I am not sure on how to represent the
imaginary part of the complex number.
Most examples I have seen use a pair of doubles, though I can't see how they are representing i.
The one I am looking at now is coded in C++ as
// Function that multiplies two complex numbers
// the result is a modified object of the class (this)
void Multiply(Complex_Number comp_num)
temp_a = this->a * comp_num.a;
temp_a += (this->b * comp_num.b)*(-1);
temp_b = this->a * comp_num.b;
temp_b += this->b * comp_num.a;
this->a = temp_a;
this->b = temp_b;
then multiplying the b value by -1. I thought onlywas equal to -1.
It's probably just me being thick, though if someone could explain how this is working
that would be cool.
Can feel it coming together.. Slowly but Surely
Hi, nice to meet you.
i think it works as distributing r1 i1 on comp2 :
=(r1*r2-i1*i2)+i(r1*i2+i1*r2)., since i*i=-1