I want to set f(x,y)=g(x,y)+g(-x,y) this equation 2D has to be symmetry. I don’t know how to write the loop for x and -x. Does anyone know how to write the loops for this equation?
— C++
— Is this a loop?
— This is a equation
— We can write for(i=0; i<2*n ; i++) this is for +x my problem is -x
— If x=i then is not -x=-i?
— I think we need to set new index like newi depends on i
— For(i=0,j=0; i<2*n; i++,j--)
— Oh
— Is that working?
— I mean i and j in same loop or we should separate them