ianmackenzie / elm-geometry

2D/3D geometry package for Elm
Mozilla Public License 2.0
183 stars 26 forks source link

Add BoundingBox2d.withDimensions and BoundingBox3d.withDimensions #130

Closed MartinSStewart closed 4 years ago

MartinSStewart commented 4 years ago

Similar to how we have Rectangle2d.withDimensions except there wouldn't be an angle parameter for the bounding box.

I found this useful to have when I wanted to take a 2d bounding box and make both dimensions equal to the dimension with the greatest length. I suspect constructing the bounding box with BoundingBox2d.from or BoundingBox2d.fromExtema would be more verbose and less intuitive.