Turn on Turbo mode! So it doesn't really work because I don't know the ratio of the objects and where exactly the square begins or ends in the coordinate plane. So I basically approximated the approximation. :)
Got to 3.141 ish tho, enough proof to me that this approximation should work with more precise numbers.