Точка перетину двох прямих

Console.WriteLine("Line1 " + a1 + "x + " + b1 + "y + " + c1 + " = 0");
Console.WriteLine("Line2 " + a2 + "x + " + b2 + "y + " + c2 + " = 0");
Console.WriteLine("Point of intersect: ");
double delta = -(a1*b2 - a2*b1);

if (delta == 0)
{
     Console.WriteLine("The lines are parallel");
}
else
{
     double x = (b2*c1 - b1*c2) / delta;
     double y = (a1*c2 - a2*b1) / delta;
     Console.WriteLine("x = " + x);
     Console.WriteLine("y = " + y);
}