Hello,
I’m trying to tile hexagons around a cylinder.
I want to be able to change the radius of the hexagon, and return only results that fit whole hexagons only.

E.G. As I change the diameter of the hexagons, they always fit exactly.
Is this a rounding function? some sort of logic gate?

which has the same general requirement as your design.

It is clear that anyone with a good understanding of high school geometry would be able to figure out an algorithmic way of determining the size of the hexagons (and squares in my case) and the diameter of the circular array in which they fit.

But you can also do it with simple trial and error. In my case I chose the latter approach and found the correct (to within about 0.005 mm) dimensions in around 5 minutes.

It would have taken me far longer to come up with an algorithmic solution. And something tells me that someone here will do just that - simply because they can.