Skip to contents

An extension of the standard modulus which takes an interval as the modulus, rather than a divisor. It shifts a real-valued x into the half-open real interval [a..b) by adding a multiple of the length b - a.

Usage

mod3(x, a, b)

Arguments

x

a real value

a

the lower end of the interval

b

the upper end of the interval

Value

an integer

Examples

if (FALSE) {
mod3(123, 7, 11)
}