Point A : The center of a side of a polygon inscribed in a circle
Point B : The point on the perimeter of that circle that is opposite Point A
I want to calculate the distance between Point A & Point B
I know the number of sides the polygon has and the radius of the circle it's inscribed in.
I believe this is the way to calculate the length of the side of a regular polygon with n sides (Please correct me if I'm wrong as I am not a mathematician and found this online) :
x = nrsin(π/n)
Now is the distance I'm looking for :
distance = 2r - x ?
I'm trying to figure out a formula that I could use in a bit of code I'm writing