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