MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / LEfloatint

Function LEfloatint

third-party/lua-5.5.0/src/lvm.c:477–487  ·  view source on GitHub ↗

** Check whether float 'f' is less than or equal to integer 'i'. ** See comments on previous function. */

Source from the content-addressed store, hash-verified

475** See comments on previous function.
476*/
477l_sinline int LEfloatint (lua_Number f, lua_Integer i) {
478 if (l_intfitsf(i))
479 return luai_numle(f, cast_num(i)); /* compare them as floats */
480 else { /* f <= i <=> ceil(f) <= i */
481 lua_Integer fi;
482 if (luaV_flttointeger(f, &fi, F2Iceil)) /* fi = ceil(f) */
483 return fi <= i; /* compare them as integers */
484 else /* 'f' is either greater or less than all integers */
485 return f < 0; /* less? */
486 }
487}
488
489
490/*

Callers 1

LEnumFunction · 0.70

Calls 1

luaV_flttointegerFunction · 0.70

Tested by

no test coverage detected