Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » What do round () and () mod ()
- drmcw
-
1000+ posts
What do round () and () mod ()
round will round a number to it's nearest integer. .5 should round up (away from 0) Similar operators are celing and floor which always round up or down respectively. mod gives you the remainder after one number is divided by the other.
- KermitMC
-
100+ posts
What do round () and () mod ()
This would give an output of 5
because 4.7 is greater than 4.4
This would give an output of 4
because 4.2 is less than 4.5
This would give you an output of 2
because 8/3 = 2r2, this gives an output of what's after the “r”
- Discussion Forums
- » Help with Scripts
-
» What do round () and () mod ()