aboutsummaryrefslogtreecommitdiff
path: root/src/tutorial/C-code/complex.c
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>1996-12-28 02:22:12 +0000
committerBruce Momjian <bruce@momjian.us>1996-12-28 02:22:12 +0000
commit221d7296aa3c7b55dc054bded1a76570cc5bfb29 (patch)
treee9adb6c74b9f1f48e97e2333f115d2b16f75646c /src/tutorial/C-code/complex.c
parentcb6cb7745d426e712314f6b92e79a63bd32b3759 (diff)
downloadpostgresql-221d7296aa3c7b55dc054bded1a76570cc5bfb29.tar.gz
postgresql-221d7296aa3c7b55dc054bded1a76570cc5bfb29.zip
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
Diffstat (limited to 'src/tutorial/C-code/complex.c')
-rw-r--r--src/tutorial/C-code/complex.c4
1 files changed, 2 insertions, 2 deletions
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;