@karelrosseel82 I’ve moved this question to its own topic since it specifically concerns using the
The first question in your screen shot asks:
"is round down only for numbers like 3.1 i.e. decimal numbers"
Yes, all 3 of these options expect a comma number (decimal number) and return an appropriate whole number (integer).
To test a block like this for yourself you can create a new test project and do something like this:
If you now preview this in Thunkable Live you can try out different combinations of number and rounding for yourself.
- round(6.1) = 6
- round(6.8) = 7
- round_up(6.1) = 7
- round_up(6.8) = 7
- round_down(6.1) = 6
- round_down(6.8) = 6
Your second question then, is something like:
"Can I disregard the ones value of a number, i.e round down to the nearest tens value?
Again, this is pretty straightforward if you break it down into smaller pieces.
- The first thing is to divide your number by 10, thus 61 becomes 6.1, 68 would become 6.8
- Next, round down the result of this calculation so 6.1 becomes 6 and 6.8 also becomes 6
*Finally, multiply the answer by 10 to get 60
Hope that helps.