def wrapTo2PI(stradiance): result = 0.0 if stradiance == pi2: return pi2; else: result = math.fmod(stradiance, pi2); if result < 0: return (result + pi2); return result