pub fn crossing_fraction_q16_i32(
first_distance: i32,
second_distance: i32,
) -> u32Expand description
Exact Q16 crossing fraction of an edge from its two signed plane distances.
(first << 16) / (first - second), clamped to 0..=65536, computed with
32-bit operations only: the R3000A has no 64-bit divide, and the earlier
i64 form of this function was the last 64-bit division helper linked
into the PXBSP world path. The magnitude runs through the hardware divide
when first << 16 fits, and through div_u64_by_u32 otherwise; both
are exact, so the result equals the wide form bit for bit.