How to centre an icon inside a square and a circle?
A little mathematical / spatial / design problem I've been having.
I have an icon which, depending on the user's preference, can be inside a square or a circle. Is it possible for it to be centred in both?
Here's a visual example. On the left is the AirBnB logo centred in a square. When the background is turned into a circle, the logo appears to "drop" - the bottom of the logo is closer to the edge than the top of the logo.

So, let's change that and make the logo's extremities equidistant from the circumference of the circle:

Now, in the square version, it appears to be floating near the top.
Part of the problem is that I don't know what terms I need to search for. I am lacking in design vocabulary.
Is this a problem which can be solved? Can you help square this circle? Please let me know!
Ed says: