mirror of https://github.com/rusefi/lua.git
detail (comment)
This commit is contained in:
parent
ca6fe7449a
commit
6353d619a5
15
luaconf.h
15
luaconf.h
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
** $Id: luaconf.h,v 1.262 2017/12/07 18:53:33 roberto Exp roberto $
|
** $Id: luaconf.h,v 1.263 2017/12/30 20:46:18 roberto Exp roberto $
|
||||||
** Configuration file for Lua
|
** Configuration file for Lua
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
|
@ -437,12 +437,13 @@
|
||||||
l_sprintf((s), sz, LUA_NUMBER_FMT, (LUAI_UACNUMBER)(n))
|
l_sprintf((s), sz, LUA_NUMBER_FMT, (LUAI_UACNUMBER)(n))
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ lua_numbertointeger converts a float number to an integer, or
|
@@ lua_numbertointeger converts a float number with an integral value
|
||||||
** returns 0 if float is not within the range of a lua_Integer.
|
** to an integer, or returns 0 if float is not within the range of
|
||||||
** (The range comparisons are tricky because of rounding. The tests
|
** a lua_Integer. (The range comparisons are tricky because of
|
||||||
** here assume a two-complement representation, where MININTEGER always
|
** rounding. The tests here assume a two-complement representation,
|
||||||
** has an exact representation as a float; MAXINTEGER may not have one,
|
** where MININTEGER always has an exact representation as a float;
|
||||||
** and therefore its conversion to float may have an ill-defined value.)
|
** MAXINTEGER may not have one, and therefore its conversion to float
|
||||||
|
** may have an ill-defined value.)
|
||||||
*/
|
*/
|
||||||
#define lua_numbertointeger(n,p) \
|
#define lua_numbertointeger(n,p) \
|
||||||
((n) >= (LUA_NUMBER)(LUA_MININTEGER) && \
|
((n) >= (LUA_NUMBER)(LUA_MININTEGER) && \
|
||||||
|
|
Loading…
Reference in New Issue