emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master eab1a63 1/2: Revert "Ignore angle mode while simpli


From: Tino Calancha
Subject: [Emacs-diffs] master eab1a63 1/2: Revert "Ignore angle mode while simplifying units"
Date: Thu, 18 May 2017 01:47:57 -0400 (EDT)

branch: master
commit eab1a6307b09180bd775cfb6bf7330eb5367bbe0
Author: Tino Calancha <address@hidden>
Commit: Tino Calancha <address@hidden>

    Revert "Ignore angle mode while simplifying units"
    
    This reverts commit 713e922243fb60d850f7b0ff83f3e2a3682f1832.
    This commit causes Bug#25652.
---
 lisp/calc/calc-forms.el | 12 +++---------
 lisp/calc/calc-math.el  | 12 ++++--------
 2 files changed, 7 insertions(+), 17 deletions(-)

diff --git a/lisp/calc/calc-forms.el b/lisp/calc/calc-forms.el
index 6aa421e..abf76cf 100644
--- a/lisp/calc/calc-forms.el
+++ b/lisp/calc/calc-forms.el
@@ -317,9 +317,7 @@
         (list 'calcFunc-hms a))
        ((math-negp a)
         (math-neg (math-to-hms (math-neg a) ang)))
-       ((eq (or ang
-                 (and (not math-simplifying-units) calc-angle-mode))
-                 'rad)
+       ((eq (or ang calc-angle-mode) 'rad)
         (math-to-hms (math-div a (math-pi-over-180)) 'deg))
        ((memq (car-safe a) '(cplx polar)) a)
        (t
@@ -356,16 +354,12 @@
           (if (eq (car-safe a) 'sdev)
               (math-make-sdev (math-from-hms (nth 1 a) ang)
                               (math-from-hms (nth 2 a) ang))
-            (if (eq (or ang
-                         (and (not math-simplifying-units) calc-angle-mode))
-                     'rad)
+            (if (eq (or ang calc-angle-mode) 'rad)
                 (list 'calcFunc-rad a)
               (list 'calcFunc-deg a)))))
        ((math-negp a)
         (math-neg (math-from-hms (math-neg a) ang)))
-       ((eq (or ang
-                 (and (not math-simplifying-units) calc-angle-mode))
-             'rad)
+       ((eq (or ang calc-angle-mode) 'rad)
         (math-mul (math-from-hms a 'deg) (math-pi-over-180)))
        (t
         (math-add (math-div (math-add (math-div (nth 3 a)
diff --git a/lisp/calc/calc-math.el b/lisp/calc/calc-math.el
index 2590761..faa318d 100644
--- a/lisp/calc/calc-math.el
+++ b/lisp/calc/calc-math.el
@@ -763,14 +763,12 @@ If this can't be done, return NIL."
 (defun math-to-radians (a)   ; [N N]
   (cond ((eq (car-safe a) 'hms)
         (math-from-hms a 'rad))
-       ((and (not math-simplifying-units)
-              (memq calc-angle-mode '(deg hms)))
+       ((memq calc-angle-mode '(deg hms))
         (math-mul a (math-pi-over-180)))
        (t a)))
 
 (defun math-from-radians (a)   ; [N N]
-  (cond ((and (not math-simplifying-units)
-              (eq calc-angle-mode 'deg))
+  (cond ((eq calc-angle-mode 'deg)
         (if (math-constp a)
             (math-div a (math-pi-over-180))
           (list 'calcFunc-deg a)))
@@ -781,16 +779,14 @@ If this can't be done, return NIL."
 (defun math-to-radians-2 (a &optional force-symbolic)   ; [N N]
   (cond ((eq (car-safe a) 'hms)
         (math-from-hms a 'rad))
-       ((and (not math-simplifying-units)
-              (memq calc-angle-mode '(deg hms)))
+       ((memq calc-angle-mode '(deg hms))
         (if (or calc-symbolic-mode force-symbolic)
             (math-div (math-mul a '(var pi var-pi)) 180)
           (math-mul a (math-pi-over-180))))
        (t a)))
 
 (defun math-from-radians-2 (a &optional force-symbolic)   ; [N N]
-  (cond ((and (not math-simplifying-units)
-              (memq calc-angle-mode '(deg hms)))
+  (cond ((memq calc-angle-mode '(deg hms))
         (if (or calc-symbolic-mode force-symbolic)
             (math-div (math-mul 180 a) '(var pi var-pi))
           (math-div a (math-pi-over-180))))



reply via email to

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