Gibt den Schnittpunkt zweier linearer Funktionen zurück.
public static string getIntersection1(double m1, double n1, double m2, double n2)
{
double leftSide = m1 - m2;
double rightSide = n1 - n2;
double intersectionX = rightSide / leftSide;
double intersectionY = n1 + (intersectionX * m1);
return "Point of intersection: (" + intersectionX + "/" + intersectionY + ")";
}
Kommentare zum Snippet