MCPcopy Create free account
hub / github.com/ArduPilot/ardupilot / luaV_shiftl

Function luaV_shiftl

libraries/AP_Scripting/lua/src/lvm.c:597–606  ·  view source on GitHub ↗

** Shift left operation. (Shift right just negates 'y'.) */

Source from the content-addressed store, hash-verified

595** Shift left operation. (Shift right just negates 'y'.)
596*/
597lua_Integer luaV_shiftl (lua_Integer x, lua_Integer y) {
598 if (y < 0) { /* shift right? */
599 if (y <= -NBITS) return 0;
600 else return intop(>>, x, -y);
601 }
602 else { /* shift left */
603 if (y >= NBITS) return 0;
604 else return intop(<<, x, y);
605 }
606}
607
608
609/*

Callers 2

luaV_executeFunction · 0.85
intarithFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected