That would work for Euclidean (plane) geometry. It won't work well for
spherical geometry. Have you actually tried plotting it? How about a
line between Trondheim Norway and Bangkok?
Rossko has already pointed out what you need to consider. Is your half-way point
* half-way along a direct (great-circle) line from A to B?
* half-way along a line drawn on a projected map?
For the first scenario, see this page:
http://www.movable-type.co.uk/scripts/latlong.html
For the second scenario, assuming it's a straight line and not a
geodesic line, you need to convert A and B to pixel coordinates, find
the mid-point pixel coordinate and then find the lat-lng coordinates
of that point.