AND and OR statement...loop with several conditions

stefdelecstefdelec Member, PRO Posts: 146
edited August 2015 in Working with GS (Mac)

Hi,

I am really struggling with this.

I need to generate 2 pairs of attributes.
attr1=random(-1;1)
attr2=random(-1;1)
attr3=random(-1;1)
attr4=random(-1;1)

attr1 and attr2: I need at least one of them to be different from 0.
attr3 and attr4: I need at least one of them to be different from 0.

AND I need (attr1;attr2) different from (attr3;attr4).

I am using a loop atm:

while all : attr1 = 0 and attr 2= 0 => random both of them.

Any idea?

Thanks,

Stéphane.

Comments

Sign In or Register to comment.