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