def __clamp_cos_sin_within_threshold(self, cos_or_sin):
    new_val = cos_or_sin
    if (1 < new_val <= 1.2):
        new_val = 1.0
    elif ((- 1.2) <= new_val < (- 1)):
        new_val = (- 1.0)
    return new_val
def __clamp_cos_sin_within_threshold(self, cos_or_sin):
    new_val = cos_or_sin
    if (1 < new_val <= 1.2):
        new_val = 1.0
    elif ((- 1.2) <= new_val < (- 1)):
        new_val = (- 1.0)
    return new_val