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

Function LEfloatint

third-party/lua-5.4.6/src/lvm.c:467–477  ·  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

465** See comments on previous function.
466*/
467l_sinline int LEfloatint (lua_Number f, lua_Integer i) {
468 if (l_intfitsf(i))
469 return luai_numle(f, cast_num(i)); /* compare them as floats */
470 else { /* f <= i <=> ceil(f) <= i */
471 lua_Integer fi;
472 if (luaV_flttointeger(f, &fi, F2Iceil)) /* fi = ceil(f) */
473 return fi <= i; /* compare them as integers */
474 else /* 'f' is either greater or less than all integers */
475 return f < 0; /* less? */
476 }
477}
478
479
480/*

Callers 1

LEnumFunction · 0.70

Calls 1

luaV_flttointegerFunction · 0.70

Tested by

no test coverage detected