That makes sense. These two links might answer your questions.
https://www.geomidpoint.com/calculation.html