#ifndef lint
static char *RCSid = "$Header: /usr/brule/guest/empire/empire/emprcs/lib/gen/round.c,v 2.0 1995/07/27 05:56:17 empire Exp $";
#endif

/*
 * round.c
 *
 * round off
 *
 * from PSL Empire, 1985
 */

int
round(n, m)
	int	n;
	int	m;
{
	register int r11;

	r11 = (m >> 1) + n;
	return (r11 / m * m);
}

int
ldround(a4, ac)
	double	a4;
	int	ac;
{
	int	f4;

	f4 = ac / 2.0 + a4;
	return (f4 / ac * ac);
}
