new macro to convert double->int
This commit is contained in:
7
lua.h
7
lua.h
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
** $Id: lua.h,v 1.121 2002/02/14 21:40:13 roberto Exp roberto $
|
||||
** $Id: lua.h,v 1.122 2002/03/07 18:15:10 roberto Exp roberto $
|
||||
** Lua - An Extensible Extension Language
|
||||
** TeCGraf: Grupo de Tecnologia em Computacao Grafica, PUC-Rio, Brazil
|
||||
** e-mail: info@lua.org
|
||||
@@ -294,6 +294,11 @@ LUA_API int lua_pushupvalues (lua_State *L);
|
||||
#define lua_str2number(s,p) strtod((s), (p))
|
||||
#endif
|
||||
|
||||
/* function to convert a lua_Number to int (with any rounding method) */
|
||||
#ifndef lua_number2int
|
||||
#define lua_number2int(i,n) ((i)=(int)(n))
|
||||
#endif
|
||||
|
||||
/* }====================================================================== */
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user