Class Mod
- Namespace
- YndigoBlue.Velocity.Functions
- Assembly
- YndigoBlue.Velocity.dll
Represents the MOD (modulo) mathematical function that returns the remainder of a division operation.
public class Mod : Function, IElement, ICheckItem, IDefaultItem, IFilterItem
- Inheritance
-
Mod
- Implements
Remarks
The MOD function calculates the remainder when one number is divided by another. For example, MOD(10, 3) returns 1, MOD(17, 5) returns 2. This is useful for cyclic operations, determining odd/even values, distributing items into buckets, or implementing periodic behavior. The sign of the result typically follows the sign of the dividend, though behavior may vary by database system.
Constructors
- Mod(double, int)
Initializes a new instance of MOD with literal dividend and divisor values.
- Mod(Column, int)
Initializes a new instance of MOD with a column dividend and literal divisor.
- Mod(Column, Column)
Initializes a new instance of MOD with column-based dividend and divisor.
- Mod(Expression, Expression)
Initializes a new instance of MOD with expression-based dividend and divisor.