Correct Answer: 1. x = h3 * round((h1 - h2) / (2 * h3))
Now we'd like to tie the upper side of the
smaller rectangle to a grid. The rest is the same. We are still centering
the smaller box within a larger one, only this time rounding the value of
x
to the closest grid row.
The height of a grid row is h3
.
Here are the options:
1. x = h3 * round((h1 - h2) / (2 * h3))
2. x = h3 * (h1 - h2) / 2
3. x = h3 * floor((h1 + h2) / 2)