Function comptimeMod [src]

Return the mod of num with the smallest integer type

Prototype

pub fn comptimeMod(num: anytype, comptime denom: comptime_int) IntFittingRange(0, denom - 1)

Parameters

denom: comptime_int

Source

pub fn comptimeMod(num: anytype, comptime denom: comptime_int) IntFittingRange(0, denom - 1) { return @as(IntFittingRange(0, denom - 1), @intCast(@mod(num, denom))); }