lua-users home
lua-l archive

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


> Matrix accessor is my big big pain!!! The option M[x][y] is highly
> inefficient but somewhat convenient. I'm using the direct access
> M[M.pitch * y + x] for optimized routine but I propose the syntax:
> 
> m:get(i, j)
> 
> to the user. Quite ugly but I don't have anything better.

How about using __call and writing m(i,j)?