bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#61460: 30.0.50; Calendar shows eclipse for quarter moon


From: Michael Heerdegen
Subject: bug#61460: 30.0.50; Calendar shows eclipse for quarter moon
Date: Mon, 13 Feb 2023 06:13:49 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

Michael Heerdegen <michael_heerdegen@web.de> writes:

> My questions: [...]

BTW (3), I also don't understand those conversions of the latitude:

#+begin_src emacs-lisp
(defun eclipse-check (moon-lat phase)
  (let* ((moon-lat (* (/ float-pi 180) moon-lat))
         (moon-lat (abs (- moon-lat (* (floor (/ moon-lat float-pi))
                                       float-pi))))
         (moon-lat (if (> moon-lat 0.37)
                       (- float-pi moon-lat)
                     moon-lat))
         (...))
    (...)))
#+end_src

What does this do?  Don't we just want to convert a value in [0 360) to
one in [-pi pi] and use the absolute value of that, or so?  That would
look like

  (abs (* (/ float-pi 180) (- moon-lat 180)))

Why is our calculation so complicated?


Michael.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]