latest
Operators
Modulus

Divides two numbers and returns only the remainder.

ID

662ae72910b6cb87640c91c3

Name

Modulus

Group

Operators

Package

Math

Keywords

div
/
mod
%
/[/]+[-]?[\d.]+$/

Operators

Trigonometric

Tools

Constants

Creation method

There are two options for creating a Modulus node.

  • The first way to create a Modulus node using the search list, which is opened by double left-clicking in the workspace. You can write the name of the node you need, or words associated with this node.
    • div , / , mod , %
    • / ( Any numeric value that will become the default value for port B ).
  • The second way is to select a Modulus node from the menu that opens from the top left.
    • Menu > Math > Operators > Modulus

Steps

  • Create a Modulus node.
  • Connect the first number for modulo (dividend) to the first port.
  • Connect the second number for modulo (divisor) to the second port.

See also

Multiplication
Addition
Subtraction
Division
Integer Division

Inputs

NameTypeDescriptionDefault Value
a
Number
First number for modulo (dividend)
b
Number
Second number for modulo (divisor)

Outputs

NameTypeDescription
div
Number
The remainder of A/B