public static Point calculateIntersectingPoint(Line lineOne, Line lineTwo) {
        double a1 = lineOne.getA();
        double b1 = lineOne.getB();
        double c1 = lineOne.getC();
        double a2 = lineTwo.getA();
        double b2 = lineTwo.getB();
        double c2 = lineTwo.getC();

        // two lines are parallel OR equal
        if (a1 == a2 && b1 == b2 || a1 == a2 && b1 == b2 && c1 == c2) {
            return null;
        }
        double x;
        double y;
        // the same way to calculate intersect point, but without dividing by zero
        if (a2 != 0) {
            x = -((c2 / a2) + b2 * (a1 * c2 - a2 * c1) / (a2 * (a2 * b1 - a1 * b2)));
            y = (a1 * c2 - a2 * c1) / (a2 * b1 - a1 * b2);
        } else {
            x = -((c1 / a1) + b1 * (a2 * c1 - a1 * c2) / (a1 * (a1 * b2 - a2 * b1)));
            y = (a2 * c1 - a1 * c2) / (a1 * b2 - a2 * b1);
        }

        return new Point(x, y);
    }