Exemple #1
0
 public CustomLine(Point p1, double s) : this()
 {
     this.point1 = p1;
     this.slope  = s;
     if (slope == 1e+10)
     {
         this.isVertical = true;
     }
     if (!isVertical)
     {
         this.c = CustomLine.calculateC(p1, slope);
     }
     ;
     this.point2 = this.calculatePoint2();
 }
Exemple #2
0
 public CustomLine(Point p1, Point p2) : this()
 {
     this.point1 = p1;
     this.point2 = p2;
     this.slope  = CustomLine.calculateSlope(p1, p2);
     if (slope == 1e+10)
     {
         this.isVertical = true;
     }
     if (!isVertical)
     {
         this.c = CustomLine.calculateC(p1, slope);
     }
     ;
 }