2014/1/16 Sean Farrow <sean.farrow@seanfarrow.co.uk>

Hi All,

 

I’m in the process of needing to calculate the centre point of a rectangle, given the top left and bottom right co-ordinates.

Before I write this myself, I was wondering whether boost Geometry already has something to do this.


You can use centroid.
http://www.boost.org/doc/libs/1_55_0/libs/geometry/doc/html/geometry/reference/algorithms/centroid/centroid_2.html