A rounded rectangle is the shape obtained by taking the convex hull of four equal circles of radius and placing their centers at the four
corners of a rectangle with side lengths and .

A filled rounded rectangle with (or ) is called a stadium.

For a rounded square with (center) length and width , the corner radius can be determined by measuring the generalized
diameter
from the edge of one rounded corner to the diagonally opposite corner. From the Pythagorean theorem, the diagonal distance from the rounded corner to the corner
of the circumscribed square is

(3)

and the corner radius
is related to the edge length of the square circumscribing the corner circle by