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