lua-users home
lua-l archive

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


Ok, my intention was to write such a function

function modulus(n, d) return n - (q = math.floor(n/d)) * d, q; end

is there any means to write it down just as simple?

r, q = modulus(10, 3)