summaryrefslogtreecommitdiff
path: root/src/backend/port/qnx4/rint.c
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2000-04-12 17:17:23 +0000
committerBruce Momjian <bruce@momjian.us>2000-04-12 17:17:23 +0000
commit52f77df613cea1803ce86321c37229626d9f213c (patch)
treebd9ac9f667f295cb65f4c448a5bb5a062d656b27 /src/backend/port/qnx4/rint.c
parentdb4518729d85da83eafdacbcebaeb12618517595 (diff)
Ye-old pgindent run. Same 4-space tabs.
Diffstat (limited to 'src/backend/port/qnx4/rint.c')
-rw-r--r--src/backend/port/qnx4/rint.c28
1 files changed, 17 insertions, 11 deletions
diff --git a/src/backend/port/qnx4/rint.c b/src/backend/port/qnx4/rint.c
index 2683ce849b7..4450d8c0567 100644
--- a/src/backend/port/qnx4/rint.c
+++ b/src/backend/port/qnx4/rint.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/port/qnx4/Attic/rint.c,v 1.1 1999/12/16 16:52:52 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/port/qnx4/Attic/rint.c,v 1.2 2000/04/12 17:15:30 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -15,17 +15,23 @@
#include <math.h>
#include "os.h"
-double rint(double x)
+double
+rint(double x)
{
- double f, n = 0.;
+ double f,
+ n = 0.;
- f = modf( x, &n );
+ f = modf(x, &n);
- if( x > 0. ) {
- if( f > .5 ) n += 1.;
- }
- else if( x < 0. ) {
- if( f < -.5 ) n -= 1.;
- }
- return n;
+ if (x > 0.)
+ {
+ if (f > .5)
+ n += 1.;
+ }
+ else if (x < 0.)
+ {
+ if (f < -.5)
+ n -= 1.;
+ }
+ return n;
}