fn midpoint(a: Fixed, b: Fixed) -> Fixed
Computes midpoint between a and b, avoiding overflow if the sum of the high 16 bits exceeds i16::MAX.
a
b
i16::MAX