- Reworked the connection object and the IO system

- Reworked the support for TRICS
- Added a second generation motor
This commit is contained in:
koennecke
2009-02-03 08:05:39 +00:00
parent f6d595665e
commit 361ee9ebea
119 changed files with 16455 additions and 3674 deletions

21
nintf.c
View File

@ -3,6 +3,8 @@
is an implementation.
Mark Koennecke, February 2000
Added double version, Mark Koennecke, August 2008
---------------------------------------------------------------------------*/
#include <math.h>
@ -24,3 +26,22 @@
}
return (float) ip;
}
/*-------------------------------------------------------------------*/
double nintd(double f)
{
double ip, rm, dVal;
double fRes;
dVal = (double)f;
rm = modf(dVal,&ip);
if(rm < .0)rm = -rm;
if(rm > .5)
{
if(ip < .0)
ip -= 1.;
else
ip += 1.;
}
return (double) ip;
}