[Python-modules-commits] [python-pysolar] 02/02: Fixed accidental integer division; thanks to Brent Pedersen for catching the error.

Wolfgang Borgert debacle at moszumanska.debian.org
Fri Oct 3 23:36:22 UTC 2014


This is an automated email from the git hooks/post-receive script.

debacle pushed a commit to annotated tag 0.4.1
in repository python-pysolar.

commit fafaf8573c85ca47afd676e273bbafe3ddc5fecf
Author: pingswept <brandon at pingswept.org>
Date:   Fri Sep 18 10:42:20 2009 -0400

    Fixed accidental integer division; thanks to Brent Pedersen for catching the error.
---
 radiation.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/radiation.py b/radiation.py
index c612ff9..618a9c9 100644
--- a/radiation.py
+++ b/radiation.py
@@ -29,11 +29,11 @@ def GetAirMassRatio(altitude_deg):
 
 def GetApparentExtraterrestrialFlux(day):
 	# from Masters, p. 412
-	return 1160 + (75 * math.sin((360/365) * (day - 275)))
+	return 1160 + (75 * math.sin((360./365) * (day - 275)))
 
 def GetOpticalDepth(day):
 	# from Masters, p. 412
-	return 0.174 + (0.035 * math.sin((360/365) * (day - 100)))
+	return 0.174 + (0.035 * math.sin((360./365) * (day - 100)))
 
 def GetRadiationDirect(utc_datetime, altitude_deg):
 	# from Masters, p. 412

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-pysolar.git



More information about the Python-modules-commits mailing list