diff options
| author | Jay Belanger | 2004-11-24 21:45:32 +0000 |
|---|---|---|
| committer | Jay Belanger | 2004-11-24 21:45:32 +0000 |
| commit | 276d28655e4614e986331ae23237d5566b71f32a (patch) | |
| tree | 4b5ef73cb903cd46f48d8e5d22a4b319ee4e2b5a | |
| parent | 67549a854a0e89cd5e7808a32e912d0dd1b51847 (diff) | |
| download | emacs-276d28655e4614e986331ae23237d5566b71f32a.tar.gz emacs-276d28655e4614e986331ae23237d5566b71f32a.zip | |
(math-trunc): Replace variable prec by math-trunc-prec.
(math-floor): Replace variable prec by math-floor-prec.
| -rw-r--r-- | lisp/calc/calc-misc.el | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/lisp/calc/calc-misc.el b/lisp/calc/calc-misc.el index 159b1ee3178..082bc8826e7 100644 --- a/lisp/calc/calc-misc.el +++ b/lisp/calc/calc-misc.el | |||
| @@ -3,8 +3,7 @@ | |||
| 3 | ;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: David Gillespie <daveg@synaptics.com> | 5 | ;; Author: David Gillespie <daveg@synaptics.com> |
| 6 | ;; Maintainers: D. Goel <deego@gnufans.org> | 6 | ;; Maintainer: Jay Belanger <belanger@truman.edu> |
| 7 | ;; Colin Walters <walters@debian.org> | ||
| 8 | 7 | ||
| 9 | ;; This file is part of GNU Emacs. | 8 | ;; This file is part of GNU Emacs. |
| 10 | 9 | ||
| @@ -593,10 +592,14 @@ loaded and the keystroke automatically re-typed." | |||
| 593 | 592 | ||
| 594 | 593 | ||
| 595 | ;;; Coerce A to be an integer (by truncation toward zero). [I N] [Public] | 594 | ;;; Coerce A to be an integer (by truncation toward zero). [I N] [Public] |
| 596 | (defun math-trunc (a &optional prec) | 595 | |
| 597 | (cond (prec | 596 | ;; The variable math-trunc-prec is local to math-trunc, but used by |
| 597 | ;; math-trunc-fancy in calc-arith.el, which is called by math-trunc. | ||
| 598 | |||
| 599 | (defun math-trunc (a &optional math-trunc-prec) | ||
| 600 | (cond (math-trunc-prec | ||
| 598 | (calc-extensions) | 601 | (calc-extensions) |
| 599 | (math-trunc-special a prec)) | 602 | (math-trunc-special a math-trunc-prec)) |
| 600 | ((Math-integerp a) a) | 603 | ((Math-integerp a) a) |
| 601 | ((Math-looks-negp a) | 604 | ((Math-looks-negp a) |
| 602 | (math-neg (math-trunc (math-neg a)))) | 605 | (math-neg (math-trunc (math-neg a)))) |
| @@ -607,10 +610,14 @@ loaded and the keystroke automatically re-typed." | |||
| 607 | (defalias 'calcFunc-trunc 'math-trunc) | 610 | (defalias 'calcFunc-trunc 'math-trunc) |
| 608 | 611 | ||
| 609 | ;;; Coerce A to be an integer (by truncation toward minus infinity). [I N] | 612 | ;;; Coerce A to be an integer (by truncation toward minus infinity). [I N] |
| 610 | (defun math-floor (a &optional prec) ; [Public] | 613 | |
| 611 | (cond (prec | 614 | ;; The variable math-floor-prec is local to math-floor, but used by |
| 615 | ;; math-floor-fancy in calc-arith.el, which is called by math-floor. | ||
| 616 | |||
| 617 | (defun math-floor (a &optional math-floor-prec) ; [Public] | ||
| 618 | (cond (math-floor-prec | ||
| 612 | (calc-extensions) | 619 | (calc-extensions) |
| 613 | (math-floor-special a prec)) | 620 | (math-floor-special a math-floor-prec)) |
| 614 | ((Math-integerp a) a) | 621 | ((Math-integerp a) a) |
| 615 | ((Math-messy-integerp a) (math-trunc a)) | 622 | ((Math-messy-integerp a) (math-trunc a)) |
| 616 | ((Math-realp a) | 623 | ((Math-realp a) |