Calculate midpoint of two points (#375)