I want to draw a square inside a circle. My circle has a radius of between 0.5 and 3.
is it safe to assume my square will always be 0.66 * 2 * radius wide/high?
I am making a function to calculate if a certain point is within the circle. I already made a square to get my points out of the database.
I want to make the square within the circle to quickly determine if a point is definately within my circle
The length of the diagonal of the square corresponds to two times the radius of the circle, i.e.
At the same time it is
where
ais the length of one side of your square.Thus
which is approximately