m = (x1 + x2 / 2 , y1 + y2 / 2 )
Essentially you take the two points that the line ends and begins on. (x1, y1) and (x2, y2) then add the x's and the y's together and divide them by two and you have two points. That's the midpoint.
Hope this is helpful and I'm onto the right topic!