this is some code I wrote .. I have a question about it because a while back someone on this forum mentioned that this is a form of daisy chaining functions and should be avoided.
Code:
for( y = 1; y < window->Nyscreen; y++ ){
for( x = 1; x < window->Nxscreen; x++ ){
real = (( x * image->ximage ) / window->Nxscreen
- image->xoff);
imaginary = image->yoff - (( y * image->yimage )
/ window->Nyscreen );
putpixel(x, y, ( color( multiply(real,imaginary,max_escape ),max_escape)));
}
so I rewrote the code but Im not sure a: that I can avoid calling these functions in the for loop? and b: how would I do so? and c: should I try to?
Code:
for( x = 1; x < window->Nxscreen; x++ ){
for( y = 1; y < window->Nyscreen; y++ ){
real = (convx * x ) - window->xoff;
imaginary = window->yoff - (convy * y);
count = multiply(real, imaginary, me);
colors = color(count,me);
putpixel(x,y,colors);
}
this code is not in the main so I am calling 3 functions from a function .. is this ok?
Im on a learning curve here so thanks for anyone looking at the thread in advance .. al.