Calc.Mod Method

Special modulus that works with negative numbers in a way that's suitable for circular arrays. For example Mod(-1,10) will return 9.
public static int Mod( 
   int idx
   int l 
)

Parameters

idx
int

The index/modulus operand.

l
int

The modulus limit.

Return Value

int

.NET Framework

Supported in: 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8

In this article

Definition