Modulo

public protocol Modulo[Other = Self]

Raw protocol backing the % operator.

For integers this is the remainder of truncated division, with the sign of the dividend. Use floorMod (defined on integer types) when you want Euclidean / floor-style remainder semantics.

Associated Types

type Output

Methods

consuming func modulo(consuming Other) -> Output

Returns self % other.

Defined in lang/std/core/arithmetic.ks