[DGD] RE: DGD digest, Vol 1 #118 - 6 msgs

John Ruiz jruiz at psu.edu
Sat Feb 2 21:39:15 CET 2002


> I was wondering if anyone had a simple way to round a float up/down
and 
> return it as an int?

Although the Melville MUDlib doesn't support floats (and I see no reason
why it should), this would probably work for you:

int round(float victim)
{
	int i;
	i = victim + .5;

	return i;
}

John Ruiz
________________________
Junior, IST @ Penn State
http://www.johnruiz.com/
(814)272-4324
AIM: ipandra



_________________________________________________________________
List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list