beta
cables is under heavy development.
There might be one or another bug, please let us know about it!

Modulo Op

Modulo

outputs the remainder after division of one number by another


The result of a division, e.g. if you divide 5 by 2, the rest is 1, this is modulo.

Modulo can be used to create looping animations. e.g. timer connected to a modulo 2 would output a value between 0 and 2. after reaching 2 it will begin from 0 again.


Edit Documentation

Full Name
  • Ops.Math.Modulo
Visibility
  • Core Op - Official cables op
AuthorTest Patches


 

INPUT PORTS


number1 (Number)

a in a % b

number2 (Number)

b in a % b

pingpong (Number:boolean )

This is a handy little helper. If you e.g. use Modulo with the time this can be used to prevent jumps, the output will then alternate between smaller and bigger values instead of going up, then to zero and back up again.

OUTPUT PORTS


result (Number)

Usages of Modulo

  • Examples
  • Public
  • My Patches
  • Ops