lua-users home
lua-l archive

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

vertex_vector[20, 'x'] = 2.5

Would vertex_vector(20, 'x') be a suitable solution?

A few seconds after posting this I realized this wouldn't really be an acceptable solution given that you need an l-value to assign to ><

The following can be made to work:

	vertex_vector(20, 'x').value = 2.5

by having the call return a table or userdata with a suitable __newindex.