Stadium Area and Perimeter Calculation

In geometric stadium shape is a circle of radius (r) that has been cut in half through the center and the 2 ends are then separated by a rectangle of height (r) and width (a). therefore :
Area (A) = π r2 + 2ra
Perimeter (P) = 2( π r + a )
Stadium Calculator
Radius value (r)=m
Length side (a)=m
Area (A)=m2
Perimeter (P)=m