one_point(a1, a2, b, x, y) {
    var xys = get_points_on_the_ends(a1, a2, b);
    if(length_of(x - xys[0][0], y - xys[0][1]) > length_of(x - xys[1][0], y - xys[1][1])) {
        return equation_for_two_points(x, y, xys[0][0], xys[0][1]);
    } else {
        return equation_for_two_points(x, y, xys[1][0], xys[1][1]);
    }
}

function solve_2(a11, a12, b1, a21, a22, b2) {
    sx = (-a12*b2 + a22*b1)/(a11*a22 - a12*a21);
    sy = (a11*b2 - a21*b1)/(a11*a22 - a12*a21);
    return [sx, sy];
}


//////
/// simp