lua-users home
lua-l archive

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


On Thu, Jun 29, 2006 at 07:01:58PM +0000, Jose Marin wrote:
> I'm compiling Lua to use floats, altering the file
> luser_number.h .
> 
> The macro lua_str2number uses strtod (returns a
> double).
> 
> I could cast to (float)strtod, but I'm worried abou
> performance.

I very much doubt performance would be a problem,

> Is there some fast way of convert a string to a float?

but you could use strtof() instead of strtod().

Sam