Skip to main content

The "emod" Function

Syntax#

emod(value, divisor);
ArgumentTypeDescription
valuerealThe numerical value to modify
divisorrealThe divisor to apply

Description#

Returns the modulo (remainder) of a number with Euclidean division. Unlike the built-in mod (%) operator, this function will always return a positive value between zero and the divisor (div).

Example#

image_angle = emod(image_angle, 360);