Squares into round holes

I had success today.
A few days ago I got great circles working correctly and displaying a bounding box. The big problem was that the corners weren’t hitting each other. There was either extra line or the lines weren’t meeting. I started doing hacks to get the lines to meet up better; the code got uglier and uglier.
I assumed the reason for the problem was that the computer wasn’t precise enough and the vectors and unit circles were getting a small rounding error that was turning into a very big, very visible line problem.
Today I found out the real reason. Once again, hidden in the low level code, I was using the wrong kind of number. An integer when I should have been using a real/floating point number. With that out of the way, the “square” is showing up quite nicely. I still need to clean up the code and make it more efficient, but that was a big hurdle.
A bigger hurdle is going to be to take that “square” and project it onto a plane so that I can actually make another map out of it. A lot is hinging on the square I used being the correct shape to project as a square. I hope I chose wisely.