I am trying to learn more about the script programming side of things and so i created a program with just a Square Pallet wizard inside. I then got the script file from that program and opened it up to see how it was programmed. I noticed on part of the program it has:cnt_1_x = cnt_1 % 2 cnt_1_y = floor(cnt_1 / 2) So i understand its using the cnt variable but what does the % 2 and floor() mean? I looked all through the script manual and couldnt find anything on that. I know its probably something simple but I just cant wrap my head around it.
@Jstewart,Here's what you'll get from the UR script manual:Floor(f):Returns largest integer not greater than fAnd for the %:The % is the modulus operator. In that case, it would divide the count by 2 and find the remainder.
I am trying to learn more about the script programming side of things and so i created a program with just a Square Pallet wizard inside. I then got the script file from that program and opened it up to see how it was programmed. I noticed on part of the program it has:
So i understand its using the cnt variable but what does the % 2 and floor() mean? I looked all through the script manual and couldnt find anything on that. I know its probably something simple but I just cant wrap my head around it.