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

Function LTfloatint

third-party/lua-5.5.0/src/lvm.c:460–470  ·  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

458** See comments on previous function.
459*/
460l_sinline int LTfloatint (lua_Number f, lua_Integer i) {
461 if (l_intfitsf(i))
462 return luai_numlt(f, cast_num(i)); /* compare them as floats */
463 else { /* f < i <=> floor(f) < i */
464 lua_Integer fi;
465 if (luaV_flttointeger(f, &fi, F2Ifloor)) /* fi = floor(f) */
466 return fi < i; /* compare them as integers */
467 else /* 'f' is either greater or less than all integers */
468 return f < 0; /* less? */
469 }
470}
471
472
473/*

Callers 1

LTnumFunction · 0.70

Calls 1

luaV_flttointegerFunction · 0.70

Tested by

no test coverage detected