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

Function LEintfloat

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

431** See comments on previous function.
432*/
433l_sinline int LEintfloat (lua_Integer i, lua_Number f) {
434 if (l_intfitsf(i))
435 return luai_numle(cast_num(i), f); /* compare them as floats */
436 else { /* i <= f <=> i <= floor(f) */
437 lua_Integer fi;
438 if (luaV_flttointeger(f, &fi, F2Ifloor)) /* fi = floor(f) */
439 return i <= fi; /* compare them as integers */
440 else /* 'f' is either greater or less than all integers */
441 return f > 0; /* greater? */
442 }
443}
444
445
446/*

Callers 1

LEnumFunction · 0.70

Calls 1

luaV_flttointegerFunction · 0.70

Tested by

no test coverage detected