I have a set of points in an array. All points have x and y coordinates. How can I get the bounding rectangle of this set? The "rectangle" object should have properties like x, y, width, height. Any ideas?
Store the min and max of x and do the same to y. Now you have your rectangle.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With