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

Function LTfloatint

third-party/lua-5.4.6/src/lvm.c:450–460  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

448** See comments on previous function.
449*/
450l_sinline int LTfloatint (lua_Number f, lua_Integer i) {
451 if (l_intfitsf(i))
452 return luai_numlt(f, cast_num(i)); /* compare them as floats */
453 else { /* f < i <=> floor(f) < i */
454 lua_Integer fi;
455 if (luaV_flttointeger(f, &fi, F2Ifloor)) /* fi = floor(f) */
456 return fi < i; /* compare them as integers */
457 else /* 'f' is either greater or less than all integers */
458 return f < 0; /* less? */
459 }
460}
461
462
463/*

Callers 1

LTnumFunction · 0.70

Calls 1

luaV_flttointegerFunction · 0.70

Tested by

no test coverage detected