def _discretize(numeric_delta, camera_angle):
    """
    This operation takes a continuous `numeric_delta` camera change value (in either pitch or yaw) and
    discretizes it to be either "no change", "increase" or "decrease".

    If abs(numeric_delta) > camera_angle, it gets effectively capped at `camera_angle`, since in this discretization scheme
    the maximum you can move the camera in any direction is `camera_angle`. For `numeric_delta` values with an absolute
    value < camera angle, they are either rounded to 0 or +- 1 based on the ratio between `numeric_delta`/`camera_angle`

    :param numeric_delta: The continuous camera change value
    :param camera_angle: The angle to which the continuous value will be discretized.
    :return:
    """
    positive = numeric_delta > 0
    if abs(numeric_delta) > camera_angle:
        magnitude = 1
    else:
        magnitude = round(abs(numeric_delta)/camera_angle)
    if magnitude == 0:
        return 0
    elif magnitude == 1 and positive:
        return 1
    elif magnitude == 1 and not positive:
        return 2