lua-users home
lua-l archive

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

In that context, once the
decision is made to implement %, which I have no problems with, it
seems reasonable to me to implement the other half of that operation,
euclidean division.

Would it be terribly confusing if in fact // was a divmod operator? In pseudo code:

operator //(x, y)
    return math.floor(x/y), x%y

Their computations are often intertwined anyway, I suspect...