This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

'//' operator
#1
Please add support to use "//" operator as a divide without the remainder. In lua demo it is possible.

https://www.lua.org/cgi-bin/demo
Reply
#2
Not possible since we are using LuaJIT instead of standard Lua. It's much faster and has some advanced features. Instead of using // you can simply do this:
Code:
res = math.floor(x / y)

Or write a wrapper function:
Code:
function idiv(x, y) return math.floor(x / y) end
res = idiv(x, y)
Reply


Forum Jump: