UIntFix.divmod

void divmod()(auto ref const(UIntFix) a, auto ref const(UIntFix) d, out UIntFix q, out UIntFix r) static @safe pure nothrow @nogc

Divides a by d with remainder: q = a / d, r = a % d. A restoring long division aligned to the quotient's top bit, so it runs once per quotient bit rather than once per numerator bit.

Parameters

athe dividend
dthe divisor (nonzero)
qthe quotient (always fits the capacity)
rthe remainder (less than d)