lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


>Im thinking about something like this:
>
>C:
>int m = 4/3;
>int n = 4%3;
>
>Lua:
>m,n = math.div(4,3);

So, try
	function math.div(x,y)
		return math.floor(x/y),math.mod(x/y)
	end
--lhf