What is the best way in C++ to calculate the coordinate of a rectangle (hyper-rectangle) in n-dimension?
I have dimensions definition of the rectangle in a 1d vector like:
[min1, max1, min2, max2, ...., minN, maxN]
For example, in 2d the dimensions, the vector is
[min1, max1, min2, max2]
And the corner coordinates I am looking for are
[min1, min2], [min1, max2], [max1, min2], [max1, max2]
How do we do this for a hyper-rectangle in n-dimension?