# Rem

The function stands for remainder and returns the remainder after a value is divided by a divisor.

## Rem(Duration dividend, Duration divisor)

Returns the remainder after the dividend is divided by the divisor.

### Parameters

dividend
The duration for which you want to find the remainder.
divisor
The duration by which you want to divide the dividend.

Duration

### Remarks

The function returns the value with the same sign as the dividend.

### Examples

• `Rem(Hours(7), Hours(5))` returns 2 hrs.
• `Rem(Hours(-7), Hours(5))` returns -2 hrs.
• `Rem(Hours(7), Hours(-5))` returns 2 hrs.
• `Rem(Hours(-7), Hours(-5))` returns -2 hrs.

## Rem(Numeric dividend, Numeric divisor)

Returns the remainder after the dividend is divided by the divisor.

### Parameters

dividend
The number for which you want to find the remainder.
divisor
The number by which you want to divide the dividend.

Numeric

### Remarks

The function returns the value with the same sign as the dividend.

### Examples

• `Rem(7, 3)` returns 1
• `Rem(7, -3)` returns 1
• `Rem(-7, 3)` returns -1
• `Rem(-7, -3)` returns -1