public Prostokat(Punkt p1, Punkt p2) : this(p1.X, p2.X, p1.Y, p2.Y) { }
public Prostokat(double x1, double x2, double y1, double y2) { p1 = new Punkt(Math.Min(x1, x2), Math.Min(y1, y2)); p2 = new Punkt(Math.Max(x1, x2), Math.Max(y1, y2)); }