a
(float, default: 0): The dividend, or the number to be divided.b
(float, default: 0): The divisor, or the number to divide by.result
(float): The remainder after dividing a
by b
.a
input.b
input.result
output will emit the remainder after dividing a
by b
.list/generate
node creates a list of 10 items.list/map
spell runs for each item.list/index
node provides the current item index.list/get
node uses the remainder as the index to select the color from the ["red", "green", "blue"]
list.b
input) is not zero, as division by zero is undefined. You may want to add a is/null
check or a default/float
node to handle this case gracefully.math/modulus/integer
node instead.