Metron
Metron copied to clipboard
Support for ellipses
Metron is a lovely little library and has saved me a ton of time! Circle works for some cases, but not for ellipses. Seeing this officially supported would be great.
Hey @matt-curtis, thanks for the compliment, and for your suggestion! Of course, a circle is not an ellipse, but it would be better indeed if ellipses were part of the library. Can you give some suggestions to how you would use such an entity, and what you'd hope to have available to you in terms of properties, functions and such?
Not very much. The main uses I needed from an Ellipse type was 1. being able to get the area 2. telling whether or not a point falls within the ellipse 3. the bounding rectangle. I ended up quickly building something on top of CGPath(ellipseIn:, transform:)
.
+1 to having Ellipse(), including Ellipse(in:CGRect).