[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: lua-5.0: math lib
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Thu, 21 Nov 2002 12:26:36 -0200
>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