Boost logo

Boost Users :

Subject: Re: [Boost-users] [Geometry] Calculating the centre of a rectangle
From: TONGARI J (tongari95_at_[hidden])
Date: 2014-01-16 08:06:30


2014/1/16 Sean Farrow <sean.farrow_at_[hidden]>

> 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



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net