cirrange

pydl.goddard.misc.cirrange(ang, radians=False)[source]

Convert an angle larger than 360 degrees to one less than 360 degrees.

Parameters:

ang : float or array-like

Angle to convert. If the angle is in radians, the radians argument should be set.

radians : class:bool, optional

If True, the input angle is in radians, and the output will be between zero and 2π.

Returns:

float or array-like

Angle in the restricted range.

Examples

>>> from pydl.goddard.misc import cirrange
>>> cirrange(-270.0)
90.0