def get_lin_func_param(point_1, point_2):
    """
    given two pairs of (X,Y) extracts parameters of a linear function.
    m: slope
    b: constant
    :param point_2:
    :param point_1:
    :return: slope, constant
    """

    precision = 5
    slope = round((point_1.predicted_profit - point_2.predicted_profit) / (point_1.x - point_2.x), precision)
    constant = round(point_1.predicted_profit - point_1.x * slope, precision)
    return slope, constant