def wrap(lower, upper, x):
    '\n    Circularly alias the numeric value x into the range [lower,upper).\n\n    Valid for cyclic quantities like orientations or hues.\n    '
    axis_range = (upper - lower)
    return (lower + (((x - lower) + ((2.0 * axis_range) * (1.0 - math.floor((x / (2.0 * axis_range)))))) % axis_range))
Circularly alias the numeric value x into the range [lower,upper).

Valid for cyclic quantities like orientations or hues.
def wrap(lower, upper, x):
    '\n    Circularly alias the numeric value x into the range [lower,upper).\n\n    Valid for cyclic quantities like orientations or hues.\n    '
    axis_range = (upper - lower)
    return (lower + (((x - lower) + ((2.0 * axis_range) * (1.0 - math.floor((x / (2.0 * axis_range)))))) % axis_range))