fn compute_mid_pos(min: i32, max: i32) -> i16
Compute the mid position between two values, using wrapping arithmetic.