[][src]Function gba::divrem_i32_unchecked

pub unsafe fn divrem_i32_unchecked(numer: i32, denom: i32) -> (i32, i32)

Performs signed divide and remainder, no check for 0 division or MIN/-1.

Safety

  • If you call this with a denominator of 0 the result is implementation defined (not literal UB) including but not limited to: an infinite loop, panic on overflow, or incorrect output.
  • If you call this with MIN/-1 you'll get a panic in debug or just MIN in release (which is incorrect), because of how twos-compliment works.