public Rect(Dot a, Dot b, Dot c, Dot d) { this.a = a; this.b = b; this.c = c; this.d = d; }
public Elips(Dot a, Dot b, Dot c, Dot d) : base(a, b , c ,d) { this.a = a; this.b = b; this.c = c; this.d = d; }
public Round(Dot a, Dot b, Dot c, Dot d) : base(a, b, c, d) { this.a = a; this.b = b; this.c = c; this.d = d; radius = a.getLengthTo(b) / 2; if(a.getLengthTo(b)!=c.getLengthTo(d)) throw new System.ArgumentOutOfRangeException("Sides can't be different"); }
public double getLengthTo(Dot b) { return Math.Sqrt(Math.Pow((b.x1 - x1), 2) + Math.Pow((b.y1 - y1), 2)); }