Discuss Scratch

cs4157205
Scratcher
100+ posts

Operators

I'm confused on how certain operator blocks work including:
of
for the one above i mean – abs, floor, ceiling, etc.
round
mod0

I also wonder how these work in intros, so I would like to know that.
Could someone explain how these work? Thanks!
deesawhney
Scratcher
97 posts

Operators

absof-10
This represents the absolute value of a number. So for the block above, it would be 10.
floorof10.4
This represents the number rounded down, like a floor. So for the block above, it would be 10.
ceilingof10.4
This represents the number rounded up, like a ceiling. So for the block above, it would be 11.
round5.6
This represents the number rounded to the nearest ones place. So for the block above, it would be 6.
7mod3
This represents the remainder when the first number is divided by the second. So for the block above, the remainder would be 1. (3*2=6, 6+1=7)
deesawhney
Scratcher
97 posts

Operators

I'm not sure how they work in intros, but if I had to guess, floor, ceiling, and round give you approximate values. Mod makes it so that something can keep repeating as you increase the first number (like 0 1 2 0 1 2 0 1 2).
cs4157205
Scratcher
100+ posts

Operators

Thanks!
Nezon
Scratcher
1000+ posts

Operators

cs4157205 wrote:

Thanks!
close topic please

Powered by DjangoBB