Rounding to nearest multiple
#3

That returns the nearest whole number.

Код:
public Align(Float:angle) {
	new Float:a = angle / 45;
	floatround(a);
	return a * 45;
}
EDIT:
It actually just prints the number given in the parameter. Ex: 34.4 prints 34.399999
Reply


Messages In This Thread
Rounding to nearest multiple - by AMouldyLemon - 09.08.2016, 09:59
Re: Rounding to nearest multiple - by PrO.GameR - 09.08.2016, 10:21
Re: Rounding to nearest multiple - by AMouldyLemon - 09.08.2016, 11:06
Re: Rounding to nearest multiple - by Nero_3D - 09.08.2016, 11:14
Re: Rounding to nearest multiple - by AMouldyLemon - 09.08.2016, 11:18
Re: Rounding to nearest multiple - by Nero_3D - 09.08.2016, 11:24
Re: Rounding to nearest multiple - by AMouldyLemon - 09.08.2016, 11:26
Re: Rounding to nearest multiple - by PrO.GameR - 09.08.2016, 11:28

Forum Jump:


Users browsing this thread: 2 Guest(s)