Skip to main content

Math

Runs on: Shared (backend or chatbox overlay).

Performs one arithmetic operation on two numbers. Use it to apply a reward multiplier to a cheer or calculate a percentage.

Inputs​

NameTypeDescription
AnumberThe first operand.
BnumberThe second operand.

Outputs​

NameTypeDescription
ResultnumberThe result.

Configuration​

  • Operation:
    • + Addition
    • - Subtraction
    • * Multiplication
    • / Division
    • % Modulo (remainder)
    • ^ Exponentiation (power)

Example​

To turn a 500-Bit cheer into coins at 10 Bits per coin, connect the cheer's bits to A, a Number Data node set to 10 to B and set the operation to /. The result, 50, can go to a Set Variable node updating the viewer's coin balance.