av_compare_mod

Compare the remainders of two integer operands divided by a common divisor.

In other words, compare the least significant log2(mod) bits of integers a and b.

@code{.c} av_compare_mod(0x11, 0x02, 0x10) < 0 // since 0x11 % 0x10 (0x1) < 0x02 % 0x10 (0x2) av_compare_mod(0x11, 0x02, 0x20) > 0 // since 0x11 % 0x20 (0x11) > 0x02 % 0x20 (0x02) @endcode

@param a,b Operands @param mod Divisor; must be a power of 2 @return - a negative value if a % mod < b % mod - a positive value if a % mod > b % mod - zero if a % mod == b % mod

extern (C) @nogc nothrow
long
av_compare_mod
(
ulong a
,
ulong b
,
ulong mod
)

Meta