// find diagonal public static double Diagonal(Rectangle r) { double width = r.Width + Math.Abs(r.Point.Coords[0]); double length = r.Length + Math.Abs(r.Point.Coords[1]); return Math.Sqrt(width * width + length * length); }
// copy constructor public Rectangle(Rectangle newRectangle) : this(newRectangle.Length, newRectangle.Width, newRectangle.Point) { }
// find area public static double Area(Rectangle r) { double width = r.Width + Math.Abs(r.Point.Coords[0]); double length = r.Length + Math.Abs(r.Point.Coords[1]); return width * length; }