Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Rounding to the nearest whole number?
- PyrosTheStickman
-
23 posts
Rounding to the nearest whole number?
Is there a way to make a value represent the nearest whole number to something? Example: if I have “17” and want half of 17 rounded to the nearest whole. Half of 17 is 8.5, but I want 9, the nearest whole number. Is there a way to do this in Scratch yet?
- streamline1
-
79 posts
Rounding to the nearest whole number?
You can use:
Or:
There are probably other ways. Just stick to the round block.
-Streamline1
Or:
There are probably other ways. Just stick to the round block.
-Streamline1
- Cryptic_Lynx
-
36 posts
Rounding to the nearest whole number?
Is there a way to round to the nearest 10, like if you have 23, have the script round to 20?
- BF10
-
500+ posts
Rounding to the nearest whole number?
Is there a way to round to the nearest 10, like if you have 23, have the script round to 20?
- drmcw
-
1000+ posts
Rounding to the nearest whole number?
Is there a way to round to the nearest 10, like if you have 23, have the script round to 20?
- PyrosTheStickman
-
23 posts
Rounding to the nearest whole number?
I'll probably stick with the Round block for the time being. Thanks guys.
- Discussion Forums
- » Help with Scripts
-
» Rounding to the nearest whole number?