Example #1
0
File: Rect.cs Project: ipzPZ121/OOP
 public Rect(Dot a, Dot b, Dot c, Dot d)
 {
     this.a = a;
     this.b = b;
     this.c = c;
     this.d = d;
 }
Example #2
0
 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;
 }
Example #3
0
 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");
 }
Example #4
0
File: Dot.cs Project: ipzPZ121/OOP
 public double getLengthTo(Dot b)
 {
     return Math.Sqrt(Math.Pow((b.x1 - x1), 2) + Math.Pow((b.y1 - y1), 2));
 }