public double GetRadius() { // The adapter pretends that it's a round peg with a // radius that could fit the square pet that the adapter // actually wraps return(peg.GetWidth() * Math.Sqrt(2) / 2); }
public SquarePegAdapter(SquarePeg peg) : base(peg.GetWidth()) { this.peg = peg; }