Modulo (Expression Function Reference)

 
 
 

The Function Value Modulo command in the expression editor inserts the token fmod(<val1>,<val2>) at the insertion point in the editing pane. This token returns the remainder when <val1> is divided by <val2>. Replace the dummy arguments <val1> and <val2> with other expressions.

NoteYou can also use the operator % (percent) to represent modulo, however the % operator results in an integer (as in VBScript) where the result is approximated to the nearest integer. The fmod token, however, outputs a floating point number.

Example

fmod(sphere.kine.local.posy, 10)
sphere.kine.local.posy%10

Both examples above return the remainder when the local Y translation of sphere is divided by 10.