Skip to main content

div_i16

Function div_i16 

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

Fixed-point division for Q15 values.

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

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