functionmod1

Modulo operator for 1-based indexing (compatible with Modelica)

Extends from Modelica.Icons.Function (Icon for functions).

Information

Examples:
mod1(4,3) returns 1. mod1(3,3) returns 3, but mod(3,3) returns 0 (where mod is the built-in modulo operator).

Inputs

TypeNameDefaultDescription
IntegernumDividend
IntegerdenDivisor

Outputs

TypeNameDefaultDescription
IntegerindexRemainder with 1-based indexing