Proof that if a triangle is inscribed in a circle so that one side of the triangle is the diameterof the circle, then the angle opposite that side is right angle

In the figure below it can be noted that triangle BOA and AOC are isoceles triangle hence angle OBA is equal to angle angle OAB
(two sides of raduis are shared as the sides of triangle). On the other hand, angle OAC is equal to OCA. With that in mind, we
know that the sum of the angles of triangle add to 180 degrees. Therefore we can state that X+X+Y+Y = 180 which means that 2X
+2Y = 180 by dividing by 2 the equation becomes X+Y = 90. Given the angle opposite to the diameter is BAC then we can conclude
that this angle is always 90 degrees (X+Y). Lick here for the gsp file.