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

Function LEintfloat

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

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

Source from the content-addressed store, hash-verified

441** See comments on previous function.
442*/
443l_sinline int LEintfloat (lua_Integer i, lua_Number f) {
444 if (l_intfitsf(i))
445 return luai_numle(cast_num(i), f); /* compare them as floats */
446 else { /* i <= f <=> i <= floor(f) */
447 lua_Integer fi;
448 if (luaV_flttointeger(f, &fi, F2Ifloor)) /* fi = floor(f) */
449 return i <= fi; /* compare them as integers */
450 else /* 'f' is either greater or less than all integers */
451 return f > 0; /* greater? */
452 }
453}
454
455
456/*

Callers 1

LEnumFunction · 0.70

Calls 1

luaV_flttointegerFunction · 0.70

Tested by

no test coverage detected