Esempio n. 1
0
 public static void ThrowIfInvalidShape(ILineLike shape)
 {
     if (shape.Point1 == shape.Point2)
     {
         throw new InvalidShapeException();
     }
 }
Esempio n. 2
0
 public static float Yint(ILineLike line)
 => (float)(line.Point1.Y - Grad(line) * line.Point1.X);
Esempio n. 3
0
 public static float Grad(ILineLike line)
 => (float)((line.Point2.Y - line.Point1.Y) / (line.Point2.X - line.Point1.X));