L3DT users' wiki
Large 3D terrain generator

mod

Description

Calculate the modulo of two integers (i.e. the remainder of arg1 divided by arg2).

Function prototype

variant mod <variant:arg1> <variant:arg2>

Arguments

Name Type Comment
arg1 variant The dividend of the modulo operation.
arg2 variant The divisor of the modulo operation.

Return value

The value of arg1 modulo arg2, in the data type of arg1.

Example

echo <zs:mod 17 3>

… the output of which is written to the event log by echo as:

2

Comments

None.

See also

 
plugins/general/zeoscript/reference/functions/mod.txt · Last modified: 2017/08/31 06:22 (external edit)
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki