From 221d7296aa3c7b55dc054bded1a76570cc5bfb29 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Sat, 28 Dec 1996 02:22:12 +0000 Subject: Here is a bug fix and some spelling changes for the complex number tutorial code. I have also written a complete complex number package based on this tutorial; I will submit this as a contribution soon. Is there a particular format for contributed tar files? I have a C source file, two SQL files, and a Makefile. Thomas Lockhart --- src/tutorial/C-code/complex.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/tutorial/C-code/complex.c') diff --git a/src/tutorial/C-code/complex.c b/src/tutorial/C-code/complex.c index bebdd511d4d..e554b7fcfb7 100644 --- a/src/tutorial/C-code/complex.c +++ b/src/tutorial/C-code/complex.c @@ -113,9 +113,9 @@ int4 complex_abs_cmp(Complex *a, Complex *b) { double amag = Mag(a), bmag = Mag(b); - if (a < b) + if (amag < bmag) return -1; - else if (a > b) + else if (amag > bmag) return 1; else return 0; -- cgit v1.2.3