Modulo (LogiX node)
Jump to navigation
Jump to search
% | ||
---|---|---|
![]() | ||
Inputs | ||
Float | A | |
Float | B | |
Outputs | ||
Float | * |
The % node divides A by B and outputs the remainder.
Usage
The top input is the number to divide, the bottom what we are dividing by. Returns the remainder of division.
Examples
An example of Modulo. Here, the remainder is 7.
We can use the Modulo node to determine whether a number is even or odd. To do this, divide the number by 2. 0 indicates even and 1 indicates odd.