Using the complex.h header files complex number functions?
851
3
0
May 16, 2022 8:22 p.m.
I'm having some trouble utilising the constructor function from the complex number function, as I am not entirely sure of the syntax of the function, help would be appreciated.
jsmack
Member
7770 posts
Joined: Sept. 2011
Offline
May 16, 2022 8:50 p.m.
The constructor function CMPLX is just a regular function that takes two float arguments.
for example:
complex z = CMPLX (3.14 , 2.227 );
printf ("%d" , cimag (z ))
printf ("%d" , creal (z ))
2.227
3.14
You can also use the struct constructer style
May 17, 2022 8:28 p.m.
Just impemented the mandelbrot set with the functions, thanks for your help!
jsmack
Member
7770 posts
Joined: Sept. 2011
Offline
May 17, 2022 8:42 p.m.
_GandalfTheGay_ Just impemented the mandelbrot set with the functions, thanks for your help!Nice! Don't forget to enable 64bit if you plan on zooming in much.