MCPcopy Create free account
hub / github.com/Achain-Dev/Achain / b_rot

Function b_rot

src/Chain/libraries/glua/lbitlib.cpp:140–148  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

138
139
140static int b_rot(lua_State *L, lua_Integer d) {
141 lua_Unsigned r = checkunsigned(L, 1);
142 int i = d & (LUA_NBITS - 1); /* i = d % NBITS */
143 r = trim(r);
144 if (i != 0) /* avoid undefined shift of LUA_NBITS when i == 0 */
145 r = (r << i) | (r >> (LUA_NBITS - i));
146 pushunsigned(L, trim(r));
147 return 1;
148}
149
150
151static int b_lrot(lua_State *L) {

Callers 2

b_lrotFunction · 0.85
b_rrotFunction · 0.85

Calls 1

trimFunction · 0.50

Tested by

no test coverage detected