Skip to main content

div_i32

Function div_i32 

Source
pub fn div_i32(numerator: i32, denominator: i32) -> Result<(i32, i16)>
Expand description

Fixed-point division for Q31 values.

The returned pair (quotient, shift) represents: numerator / denominator = quotient * 2^shift, where quotient is normalized.

On divide-by-zero, Error::NanInf is returned.