From f20bd1cfa63345153f93d1ae1adc498112b06ace Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sun, 13 Apr 2014 21:48:51 +0200 Subject: add note for cannibalisers and time travelers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/solar.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/solar.py b/src/solar.py index 24370c1..218a38a 100644 --- a/src/solar.py +++ b/src/solar.py @@ -204,6 +204,13 @@ def sun_geometric_mean_longitude(t): @return :float The Sun's geometric mean longitude in radians ''' return radians((0.0003032 * t ** 2 + 36000.76983 * t + 280.46646) % 360) + # CANNIBALISERS and TIME TRAVELERS: + # The result of this function should always be positive, this + # means that after division modulo 360 but before `radians`, + # you will need to add 360 if the value is negative. This can + # only happen if `t` is negative, which can only happen for + # date times before 2000-(01)Jan-01 12:00:00 par division modulo + # implementations with the signess of atleast the left operand. def sun_geometric_mean_anomaly(t): -- cgit v1.2.3-70-g09d2