def wrap1(angle, wrap=360):
    """
    1 sided wrap of angle to interval [0, wrap]
    angle and wrap may be positive or negative
    If wrap == 0 just returns angle i.e. don't wrap
    """
    if wrap != 0:
        angle %= wrap  # wrap to full circle first
    return angle