def scale_precision(precision_limits, min_scaling, max_scaling, start, end):
    """Scale the precision to the desired interval

    :param precision_limits: desired precision of the control limits
    :param min_scaling: minimum
    :param max_scaling maximum
    :param start: start of the scaling interval
    :param end: end of the scaling interval
    :return: scaled precision
    """

    return (end - start) * ((precision_limits - min_scaling) / (max_scaling - min_scaling)) + start