I have a set of points in an array. All points have x and y coordinates. How can I get the bounding box of this set? The rectangle object must have properties such as x, y, width, height. Any ideas?
Save min and max x and do the same with y. Now you have your own rectangle.
Find max x in the set, find min x in the set. Find max y in the set, find min y in the set. There is your bounding box ...