]> pd.if.org Git - pdclib/blobdiff - functions/math/mod.c
Introducing personalities. Removing C++ function decs / defs.
[pdclib] / functions / math / mod.c
index 9e002cf4dfc98891ca9f734ff8a92c32eec30824..ed3a371ee65ac84961a2cf08a7247793a54ebbe8 100644 (file)
@@ -5,19 +5,20 @@
 // This code is Public Domain. Use, modify, and redistribute at will.
 // ----------------------------------------------------------------------------
 
-// ----------------------------------------------------------------------------
-// C++
+double fmod( double x, double y ) { /* TODO */ };
 
-float fmod( float x, float y ) { /* TODO */ };
-long double fmod( long double x, long double y ) { /* TODO */ };
+/* Therx code
+{
+    return (int) ( ( ( ( x / y ) - ( (int) ( x / y ) ) ) * y ) + 0.5 );
+}
+*/
 
-float modf( float x, float * integer ) { /* TODO */ };
-long double modf( long double x, long double * integer ) { /* TODO */ };
+/* PDPC code - unreviewed
+{
+    return (x / y);
+}
+*/
 
-// ----------------------------------------------------------------------------
-// Standard C
-
-double fmod( double x, double y ) { /* TODO */ };
 float fmodf( float x, float y ) { /* TODO */ };
 long double fmodl( long double x, long double y ) { /* TODO */ };