Style cleanup; don't put closing parens on their
[bpt/emacs.git] / lisp / calc / calc-cplx.el
index b24e2a1..df0ebff 100644 (file)
@@ -1,5 +1,5 @@
 ;; Calculator for GNU Emacs, part II [calc-cplx.el]
-;; Copyright (C) 1990, 1991, 1992, 1993 Free Software Foundation, Inc.
+;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc.
 ;; Written by Dave Gillespie, daveg@synaptics.com.
 
 ;; This file is part of GNU Emacs.
 (defun calc-argument (arg)
   (interactive "P")
   (calc-slow-wrapper
-   (calc-unary-op "arg" 'calcFunc-arg arg))
-)
+   (calc-unary-op "arg" 'calcFunc-arg arg)))
 
 (defun calc-re (arg)
   (interactive "P")
   (calc-slow-wrapper
-   (calc-unary-op "re" 'calcFunc-re arg))
-)
+   (calc-unary-op "re" 'calcFunc-re arg)))
 
 (defun calc-im (arg)
   (interactive "P")
   (calc-slow-wrapper
-   (calc-unary-op "im" 'calcFunc-im arg))
-)
+   (calc-unary-op "im" 'calcFunc-im arg)))
 
 
 (defun calc-polar ()
@@ -55,8 +52,7 @@
      (if (or (calc-is-inverse)
             (eq (car-safe arg) 'polar))
         (calc-enter-result 1 "p-r" (list 'calcFunc-rect arg))
-       (calc-enter-result 1 "r-p" (list 'calcFunc-polar arg)))))
-)
+       (calc-enter-result 1 "r-p" (list 'calcFunc-polar arg))))))
 
 
 
   (interactive)
   (calc-wrapper
    (calc-change-mode 'calc-complex-format nil t)
-   (message "Displaying complex numbers in (X,Y) format."))
-)
+   (message "Displaying complex numbers in (X,Y) format.")))
 
 (defun calc-i-notation ()
   (interactive)
   (calc-wrapper
    (calc-change-mode 'calc-complex-format 'i t)
-   (message "Displaying complex numbers in X+Yi format."))
-)
+   (message "Displaying complex numbers in X+Yi format.")))
 
 (defun calc-j-notation ()
   (interactive)
   (calc-wrapper
    (calc-change-mode 'calc-complex-format 'j t)
-   (message "Displaying complex numbers in X+Yj format."))
-)
+   (message "Displaying complex numbers in X+Yj format.")))
 
 
 (defun calc-polar-mode (n)
@@ -93,8 +86,7 @@
         (calc-change-mode 'calc-complex-mode 'polar)
         (message "Preferred complex form is polar."))
      (calc-change-mode 'calc-complex-mode 'cplx)
-     (message "Preferred complex form is rectangular.")))
-)
+     (message "Preferred complex form is rectangular."))))
 
 
 ;;;; Complex numbers.
          ((math-negp r)
           (math-neg (list 'polar (math-neg r) th)))
          (t
-          (list 'polar r th))))
-)
+          (list 'polar r th)))))
 
 
 ;;; Coerce A to be complex (rectangular form).  [c N]
             (list 'cplx
                   (math-mul (nth 1 a) (nth 1 sc))
                   (math-mul (nth 1 a) (nth 2 sc))))))
-       (t (list 'cplx a 0)))
-)
+       (t (list 'cplx a 0))))
 
 ;;; Coerce A to be complex (polar form).  [c N]
 (defun math-polar (a)
        (t
         (list 'polar
               (math-abs a)
-              (calcFunc-arg a))))
-)
+              (calcFunc-arg a)))))
 
 ;;; Multiply A by the imaginary constant i.  [N N] [Public]
 (defun math-imaginary (a)
                             (eq calc-complex-mode 'polar)))
                    (list 'polar 1 (math-quarter-circle nil))
                  '(cplx 0 1)))
-    (math-mul a '(var i var-i)))
-)
+    (math-mul a '(var i var-i))))
 
 
 
         t)
        ((eq (car-safe b) 'cplx)
         nil)
-       (t (eq calc-complex-mode 'polar)))
-)
+       (t (eq calc-complex-mode 'polar))))
 
 ;;; Force A to be in the (-pi,pi] or (-180,180] range.
 (defun math-fix-circular (a &optional dir)   ; [R R]
               ((or (Math-lessp '(float -18 1) a) (eq dir -1))
                a)
               (t
-               (math-fix-circular (math-add a '(float 36 1)) 1)))))
-)
+               (math-fix-circular (math-add a '(float 36 1)) 1))))))
 
 
 ;;;; Complex numbers.
        ((Math-realp a) a)
        ((Math-numberp a)
         (math-normalize (math-polar a)))
-       (t (list 'calcFunc-polar a)))
-)
+       (t (list 'calcFunc-polar a))))
 
 (defun calcFunc-rect (a)   ; [N N] [Public]
   (cond ((Math-vectorp a)
        ((Math-realp a) a)
        ((Math-numberp a)
         (math-normalize (math-complex a)))
-       (t (list 'calcFunc-rect a)))
-)
+       (t (list 'calcFunc-rect a))))
 
 ;;; Compute the complex conjugate of A.  [O O] [Public]
 (defun calcFunc-conj (a)
             (and inf
                  (math-mul (calcFunc-conj (math-infinite-dir a inf)) inf))))
          (t (calc-record-why 'numberp a)
-            (list 'calcFunc-conj a))))
-)
+            (list 'calcFunc-conj a)))))
 
 
 ;;; Compute the complex argument of A.  [F N] [Public]
             '(var nan var-nan)
           (calcFunc-arg (math-infinite-dir a))))
        (t (calc-record-why 'numvecp a)
-          (list 'calcFunc-arg a)))
-)
+          (list 'calcFunc-arg a))))
 
 (defun math-imaginary-i ()
   (let ((val (calc-var-value 'var-i)))
        (equal val '(cplx 0 1))
        (and (eq (car-safe val) 'polar)
             (eq (nth 1 val) 0)
-            (Math-equal (nth 1 val) (math-quarter-circle nil)))))
-)
+            (Math-equal (nth 1 val) (math-quarter-circle nil))))))
 
 ;;; Extract the real or complex part of a complex number.  [R N] [Public]
 ;;; Also extracts the real part of a modulo form.
          ((eq (car a) 'neg)
           (math-neg (calcFunc-re (nth 1 a))))
          (t (calc-record-why 'numberp a)
-            (list 'calcFunc-re a))))
-)
+            (list 'calcFunc-re a)))))
 
 (defun calcFunc-im (a)
   (let (aa bb)
          ((eq (car a) 'neg)
           (math-neg (calcFunc-im (nth 1 a))))
          (t (calc-record-why 'numberp a)
-            (list 'calcFunc-im a))))
-)
-
-
+            (list 'calcFunc-im a)))))
 
+;;; calc-cplx.el ends here