]> pd.if.org Git - pdclib/blobdiff - functions/math/ceil.c
Re-import from Subversion.
[pdclib] / functions / math / ceil.c
index 11eb88f8e536a279fbff89f377c140771b01bafd..4c1e7bd276acc6c192886672650a314325ffbef5 100644 (file)
@@ -1,19 +1,30 @@
-// ----------------------------------------------------------------------------
-// $Id$
-// ----------------------------------------------------------------------------
-// Public Domain C Library - http://pdclib.sourceforge.net
-// This code is Public Domain. Use, modify, and redistribute at will.
-// ----------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ * $Id$
+ * ----------------------------------------------------------------------------
+ * Public Domain C Library - http://pdclib.sourceforge.net
+ * This code is Public Domain. Use, modify, and redistribute at will.
+ * --------------------------------------------------------------------------*/
 
-// ----------------------------------------------------------------------------
-// C++
+double ceil( double x ) { /* TODO */ };
 
-float ceil( float x ) { /* TODO */ };
-long double ceil( long double x ) { /* TODO */ };
+/* Therx code
+{
+    return ( x < 0 ) ? (int) x : ( (int) x ) + 1;
+}
+*/
 
-// ----------------------------------------------------------------------------
-// Standard C
+/* PDPC code - unreviewed
+{
+    int y;
+    
+    y = (int)x;
+    if ((double)y < x)
+    {
+        y++;
+    }
+    return ((double)y);
+}
+*/
 
-double ceil( double x ) { /* TODO */ };
 float ceilf( float x ) { /* TODO */ };
 long double ceill( long double x ) { /* TODO */ };