I have a vector of points stored in a std::vector instance. I want to calculate the bounding box of these points. I\'ve tried with this code:
std::vector
bo
Simply iterate over all elements and keep track of the current min/max. You can use boost::minmax to update both at the same time. Really no need to iterate twice over your dataset.