diff options
| author | Jim Blandy | 1993-08-20 15:55:29 +0000 |
|---|---|---|
| committer | Jim Blandy | 1993-08-20 15:55:29 +0000 |
| commit | 808977603efd8e4e04b43ce4a92d9157185512d6 (patch) | |
| tree | 94011810f1365a9743d7fb1e6612420ba60d5699 | |
| parent | 75f9d62502121ee19b92611bcca4e74a14548dcc (diff) | |
| download | emacs-808977603efd8e4e04b43ce4a92d9157185512d6.tar.gz emacs-808977603efd8e4e04b43ce4a92d9157185512d6.zip | |
* solar.el (solar-sunrise, solar-sunset, solar-longitude-of-sun):
Make both arguments to solar-mod float.
(sunrise-sunset): Change screen-width to frame-width.
| -rw-r--r-- | lisp/calendar/solar.el | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lisp/calendar/solar.el b/lisp/calendar/solar.el index 5acef8aa759..e0e51334a2e 100644 --- a/lisp/calendar/solar.el +++ b/lisp/calendar/solar.el | |||
| @@ -188,7 +188,7 @@ Returns nil if nothing was entered." | |||
| 188 | (* 1.916 (solar-sin-degrees mean-anomaly)) | 188 | (* 1.916 (solar-sin-degrees mean-anomaly)) |
| 189 | (* 0.020 (solar-sin-degrees (* 2 mean-anomaly))) | 189 | (* 0.020 (solar-sin-degrees (* 2 mean-anomaly))) |
| 190 | 282.634) | 190 | 282.634) |
| 191 | 360))) | 191 | 360.0))) |
| 192 | 192 | ||
| 193 | (defun solar-right-ascension (longitude) | 193 | (defun solar-right-ascension (longitude) |
| 194 | "Right ascension of the sun, given its LONGITUDE." | 194 | "Right ascension of the sun, given its LONGITUDE." |
| @@ -231,7 +231,7 @@ of hours. Returns nil if the sun does not rise at that location on that day." | |||
| 231 | (mod (- (+ local-sunrise solar-right-ascension-at-sunrise) | 231 | (mod (- (+ local-sunrise solar-right-ascension-at-sunrise) |
| 232 | (+ (* 0.065710 approx-sunrise) | 232 | (+ (* 0.065710 approx-sunrise) |
| 233 | 6.622)) | 233 | 6.622)) |
| 234 | 24))) | 234 | 24.0))) |
| 235 | (+ (- local-mean-sunrise (solar-degrees-to-hours calendar-longitude)) | 235 | (+ (- local-mean-sunrise (solar-degrees-to-hours calendar-longitude)) |
| 236 | (/ calendar-time-zone 60.0)))))) | 236 | (/ calendar-time-zone 60.0)))))) |
| 237 | 237 | ||
| @@ -262,7 +262,7 @@ of hours. Returns nil if the sun does not set at that location on that day." | |||
| 262 | (local-mean-sunset | 262 | (local-mean-sunset |
| 263 | (mod (- (+ local-sunset solar-right-ascension-at-sunset) | 263 | (mod (- (+ local-sunset solar-right-ascension-at-sunset) |
| 264 | (+ (* 0.065710 approx-sunset) 6.622)) | 264 | (+ (* 0.065710 approx-sunset) 6.622)) |
| 265 | 24))) | 265 | 24.0))) |
| 266 | (+ (- local-mean-sunset (solar-degrees-to-hours calendar-longitude)) | 266 | (+ (- local-mean-sunset (solar-degrees-to-hours calendar-longitude)) |
| 267 | (/ calendar-time-zone 60.0)))))) | 267 | (/ calendar-time-zone 60.0)))))) |
| 268 | 268 | ||
| @@ -430,7 +430,7 @@ This function is suitable for execution in a .emacs file." | |||
| 430 | (time-string (solar-sunrise-sunset date)) | 430 | (time-string (solar-sunrise-sunset date)) |
| 431 | (msg (format "%s: %s" date-string time-string)) | 431 | (msg (format "%s: %s" date-string time-string)) |
| 432 | (one-window (one-window-p t))) | 432 | (one-window (one-window-p t))) |
| 433 | (if (<= (length msg) (screen-width)) | 433 | (if (<= (length msg) (frame-width)) |
| 434 | (message msg) | 434 | (message msg) |
| 435 | (with-output-to-temp-buffer "*temp*" | 435 | (with-output-to-temp-buffer "*temp*" |
| 436 | (princ (concat date-string "\n" time-string))) | 436 | (princ (concat date-string "\n" time-string))) |