Module tune::math[][src]

Specialized integer operations missing from the standard library.

Traits

U32Denom

Marks unsigned integer types that can be safely used in 32-bit integer divisions.

Functions

gcd_u16

Determines the greatest common divisor of two u16s.

i32_div_u

Returns the euclidean division of a signed numer and an unsigned denom.

i32_dr_u

Evaluates i32_div_u and i32_rem_u in one call.

i32_rem_u

Returns the euclidean remainder of a signed numer and an unsigned denom.

odd_factors_u16

Removes all powers of two from a u16.

simplify_u16

Simplifies a fraction of u16s.