lua-users home
lua-l archive

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


I feel really stupid for asking this.

local pos = {unpack({1,2,3}), 4}
print("pos size ".. #pos)

I would expect #pos to return 4, but instead its 2. A more real world situation would be to convert a vec3 to vec4 like this: 

        local vec4 = {unpack(vec3), 1}

What the heck am I missing?

Thijs