Discuss Scratch
- Discussion Forums
- » Suggestions
- » I think this should be added
- -ErrorPurpl_157
-
Scratcher
100+ posts
I think this should be added
I propose this block
The block works when b divided by a is an integer
When (a) is a multiple of (b) :: control hat
…
The block works when b divided by a is an integer
- bobcat0701
-
Scratcher
1000+ posts
I think this should be added
do you have an example of when and where this might be used
- -ErrorPurpl_157
-
Scratcher
100+ posts
I think this should be added
do you have an example of when and where this might be usedIdk sorry
- -Valtren-
-
Scratcher
1000+ posts
I think this should be added
workaround:
here's a screenshot in case the scratchblocks don't look very clear:

if <not <((A) / (B)) contains (.)? :: operators>> thenif A is a multiple of B then it will return true, otherwise it will return false.
end
here's a screenshot in case the scratchblocks don't look very clear:

- CST1229
-
Scratcher
1000+ posts
I think this should be added
(#4)I think a better workaround would be:
workaround:if <not <((A) / (B)) contains (.)? :: operators>> thenif A is a multiple of B then it will return true, otherwise it will return false.
end
here's a screenshot in case the scratchblocks don't look very clear:
<((A) mod (B)) = [0]>
- IndexErrorException
-
Scratcher
500+ posts
I think this should be added
Workaround is very simple with the modulus method or the more easy to understand division with a point test. Plus hat blocks just suck anyway because you can't control when you choose to sample the result.
- Discussion Forums
- » Suggestions
-
» I think this should be added




