X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/322b7dab59b98b5d8625d2cd29e48f1ce605f769..ba3189039adc8ec5eba5ed3e21d42019a4616b7c:/lisp/calc/calc-math.el diff --git a/lisp/calc/calc-math.el b/lisp/calc/calc-math.el index 076dab31fd..1487d07dfc 100644 --- a/lisp/calc/calc-math.el +++ b/lisp/calc/calc-math.el @@ -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-2014 Free Software Foundation, Inc. ;; Author: David Gillespie ;; Maintainer: Jay Belanger @@ -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)))