top of page

11 Math Functions

% modulo (mod)

Calculates the remainder when one integer is divided by another. It is useful for keeping a variable within a particular range (e.g. the size of an array).

remainder= dividend % divisor


dividend:   the number to be divided

divisor:  the number to divide by


Returns

the remainder



© 2021 Odyssey Navigator. All rights reserved.

bottom of page