yes, having the centroid of a polygon would be good thing. I will add it, either as Polygon2D method, or as static method in Polygon2DUtils.
creating rectangle from center and size should be possible too. I would like to manage also oriented rectangles. I think static factories in Polygon2D or Polygon2DUtils could do the job, I'll try to add them soon !
Regards
David
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi. I'm using your lib for a project and just wondered if you could add getters for the center point to Rectangle2D (or all Polygon2D classes)?
It would be nice too if there was a constructor for creating rectangles from center point with width and height.
Thanks in advance.
Hi,
yes, having the centroid of a polygon would be good thing. I will add it, either as Polygon2D method, or as static method in Polygon2DUtils.
creating rectangle from center and size should be possible too. I would like to manage also oriented rectangles. I think static factories in Polygon2D or Polygon2DUtils could do the job, I'll try to add them soon !
Regards
David