VEX ?1:0

   4811   2   0
User Avatar
Member
121 posts
Joined: July 2005
Offline
Im trying to convert this line of RSL code to vops

Ci = color(1,0,0) * (((mod(noise(s*10, t*5), t*0.9)+0.2)*0.8 > 0.5) ? 1 : 0);

and I dont understand this part
*0.8 > 0.5) ? 1 : 0);

I have seen this kind of code in some vops before, so it must be available in vex as well, but I dont even understand whats it doing. Can someone explain to me whats going on there?

Thanks again
Achim
User Avatar
Member
136 posts
Joined: July 2005
Offline

if (something > 0.5)
then return 1
else return 0


…and RSL mod() == VEX % of course
Edited by - Feb. 23, 2004 15:29:55
User Avatar
Member
121 posts
Joined: July 2005
Offline
so this is just a shorthand for if then else statement

thank you very much!!
  • Quick Links