pub fn crossing_fraction_q12_i32(
first_distance: i32,
second_distance: i32,
) -> i32Expand description
Q12 fraction for a crossing whose signed endpoint distances straddle zero.
Callers canonicalise the geometric endpoint order before calling this helper. That makes two faces which visit a shared edge in opposite directions produce the same fixed-point fraction and therefore the same clipped vertex. The division deliberately truncates: it is the cheapest R3000 policy and matches HL-PSX’s crack-free reference implementation.