lua-users home
lua-l archive

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


Is there a good reason why % is implemented in terms of floor rather than fmod? The following seems curiously inconsistent to me:

Lua 5.1 (work6)  Copyright (C) 1994-2005 Tecgraf, PUC-Rio
> =-3 % 2
1
> =math.mod(-3, 2)
-1