lua-users home
lua-l archive

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


> I recall reading that the Lua mumeric type can be changed to 
> as little 
> as a 16 bit int and Lua still works.
<snip>

Yes, I have been looking at luaconf.h now, as well as searching through
the lua-list archives. I think that changing LUA_NUMBER to int (along
with the associated changes in luaconf.h) will work for now.

Fortunately the maths needs of the high level code for my project are
not great. Perhaps I wont need fixed point at all. If it turns out that
I need more precision I can sort that out later, perhaps by creating a
new userdata type, rather than by directly modifying the lua VM to use
fixed point. This means I wont be able to write:

	width = 10
	columnWidth = width / 3

and have the calculations done in fixed point, but I am happy to live
with this. In fact I cant use that kind of syntax with fixed point math
in C anyway (it is all done with macros), so having the Lua syntax
parallel the C syntax may be a good thing.

- Daniel collins