aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/calc
diff options
context:
space:
mode:
authorJay Belanger2014-09-04 20:04:47 -0500
committerJay Belanger2014-09-04 20:04:47 -0500
commit86e714105d760ce1bcc03cd4338b9839e0bfccb9 (patch)
tree042d13f20bfd8e9abb6eeff2d840b5618cd1a970 /lisp/calc
parentbaee695a8b920aa39f50768d57aae18f9ba59e70 (diff)
downloademacs-86e714105d760ce1bcc03cd4338b9839e0bfccb9.tar.gz
emacs-86e714105d760ce1bcc03cd4338b9839e0bfccb9.zip
calc/calc-forms.el (math-normalize-hms): Do a better check for
"negative" hms forms.
Diffstat (limited to 'lisp/calc')
-rw-r--r--lisp/calc/calc-forms.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/calc/calc-forms.el b/lisp/calc/calc-forms.el
index dbde4cd0c41..a48075cce91 100644
--- a/lisp/calc/calc-forms.el
+++ b/lisp/calc/calc-forms.el
@@ -273,7 +273,10 @@
273 (m (math-normalize (nth 2 a))) 273 (m (math-normalize (nth 2 a)))
274 (s (let ((calc-internal-prec (max (- calc-internal-prec 4) 3))) 274 (s (let ((calc-internal-prec (max (- calc-internal-prec 4) 3)))
275 (math-normalize (nth 3 a))))) 275 (math-normalize (nth 3 a)))))
276 (if (math-negp h) 276 (if (or
277 (math-negp h)
278 (and (= h 0) (math-negp m))
279 (and (= h 0) (= m 0) (math-negp s)))
277 (progn 280 (progn
278 (if (math-posp s) 281 (if (math-posp s)
279 (setq s (math-add s -60) 282 (setq s (math-add s -60)