]> code.delx.au - gnu-emacs/blobdiff - lisp/calc/calc-math.el
Update copyright year to 2015
[gnu-emacs] / lisp / calc / calc-math.el
index 076dab31fd9fef42ee5d2a525d92b3990c61ae77..e7d073a9c7acb9a976181528882942969d2ccd7f 100644 (file)
@@ -1,6 +1,6 @@
 ;;; calc-math.el --- mathematical functions for Calc
 
-;; Copyright (C) 1990-1993, 2001-2011 Free Software Foundation, Inc.
+;; Copyright (C) 1990-1993, 2001-2015 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <daveg@synaptics.com>
 ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com>
@@ -777,18 +777,18 @@ If this can't be done, return NIL."
         (math-to-hms a 'rad))
        (t a)))
 
-(defun math-to-radians-2 (a)   ; [N N]
+(defun math-to-radians-2 (a &optional force-symbolic)   ; [N N]
   (cond ((eq (car-safe a) 'hms)
         (math-from-hms a 'rad))
        ((memq calc-angle-mode '(deg hms))
-        (if calc-symbolic-mode
+        (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)   ; [N N]
+(defun math-from-radians-2 (a &optional force-symbolic)   ; [N N]
   (cond ((memq calc-angle-mode '(deg hms))
-        (if calc-symbolic-mode
+        (if (or calc-symbolic-mode force-symbolic)
             (math-div (math-mul 180 a) '(var pi var-pi))
           (math-div a (math-pi-over-180))))
        (t a)))