Skip to main content

Remainder Of

Returns the remainder of the first input divided by the second input.

Remainder Of block

Description​

The Remainder Of block returns the remainder of the first input divided by the second input. This is a code block part of the Math drawer.

Usage​

Returns the remainder of the first input divided by the second input.

Syntax​

Inputs in this block:

  • First input: a number
  • Second input: a number
  • The first will be divided by the second

Example​

The model above is of precipitation throughout the four seasons. The World trait temperature changes depending on the season and affects the precipitation that is created by the cloud. The seasons are dependent on the remainder of the clock divided by 160, and naturally cycle through before repeating.

Remainder Of example code

Notes​

The Remainder Of block is useful for creating cyclical patterns and behaviors that repeat after a certain number of iterations.

  • Quotient - Returns the result of integer division