Compiled under Redhat Linux<Right

This commit is contained in:
cvs
2000-02-18 15:54:23 +00:00
parent b9529f1cfd
commit cbc7fdf334
48 changed files with 160 additions and 109 deletions

25
nintf.c Normal file
View File

@ -0,0 +1,25 @@
/*----------------------------------------------------------------------
Some systems, such as linux, miss nintf in the math library. This
is an implementation.
Mark Koennecke, February 2000
---------------------------------------------------------------------------*/
#include <math.h>
float nintf(float f)
{
double ip, rm;
float fRes;
rm = modf(f,&ip);
if(rm < .0)rm = -rm;
if(rm > .5)
{
if(ip < .0)
ip -= 1.;
else
ip += 1.;
}
return (float) ip;
}