def angle_wrap(angle, radians=False):
if radians:<EOL><INDENT>wrapped = angle % (<NUM_LIT>*pi_value)<EOL>if wrapped < <NUM_LIT:0.0>:<EOL><INDENT>wrapped = <NUM_LIT>*pi_value + wrapped<EOL><DEDENT><DEDENT>else:<EOL><INDENT>wrapped = angle % <NUM_LIT><EOL>if wrapped < <NUM_LIT:0.0>:<EOL><INDENT>wrapped = <NUM_LIT> + wrapped<EOL><DEDENT><DEDENT>return wrapped<EOL>
Wraps the input angle to 360.0 degrees.

    Parameters
    ----------

    angle : float
        The angle to wrap around 360.0 deg.

    radians : bool
        If True, will assume that the input is in radians. The output will then
        also be in radians.

    Returns
    -------

    float
        Wrapped angle. If radians is True: input is assumed to be in radians,
        output is also in radians.