#include <ncbi.h>
#include <gishlib.h>

/* 
double-to-long integer rounding function

Rounds a floating point number to the integer of the closest magnitude.
*/
long
fct_nint(x)
	register double	x;	/* argument */ 
{
	if (x >= 0.)
		x += 0.5;
	else
		x -= 0.5;

	return (long)x;
}
