The comment about the docs may be misleading. The divide by 4 is just there to fit the circle inside the view rectangle.

If you instead use triangle legs of half width and half height, then the circle radius would be the half diagonal of the rectangle. And then the circle would be too big, only just touching the corners of the rectangle.

Note that there’s nothing special about the 4. You just want to fit your radius inside the view rectangle. You could have also divided by 5 or something.

If you want more of an exact fit, you can use the lesser of the half-width compared to the half-height. For example …

```
float maxRadius = 0.0;
float xLeg = bounds.size.width / 2.0;
float yLeg = bounds.size.height / 2.0;
if (xLeg < yLeg) {
maxRadius = xLeg;
} else {
maxRadius = yLeg;
}
```