john100-- wrote:
the total dividing
What does that mean?
This is what I think you mean:
Share the total dividing.
What?...
Offline
There is this block:
<()/()>If that is what you mean by integer division. It can also go to decimals. If you would like to round the decimals then there is this block:
round()
Offline
JH1010 wrote:
There is this block:
<()/()>If that is what you mean by integer division. It can also go to decimals. If you would like to round the decimals then there is this block:(round())
Fixed. The "round" block is a reporter, not stack.
Offline
Integer division, as in 5 / 2 = 2 and not 2.5?
A possible workaround would be this:
set [divident v] to (5) set [divisor v] to (2) say (((divident) - ((divident) mod (divisor))) / (divisor))The "mod" block - short for "modulo", returns the remainder of a division. Substract this to the original dividend, and you should get a number, that when divided by the original divisor, leaves no remainder.
(round ((5) / (2)))5 / 2 = 2.5, and 0.5 rounded to the nearest integer is 1. That would give us 5 / 2 = 3, and that's obviously not true integer division.
Offline