MCPcopy Create free account
hub / github.com/ElementsProject/elements / LSBkeep

Function LSBkeep

src/simplicity/uword.h:51–53  ·  view source on GitHub ↗

Clear all but the 'n' least significant bits of a UWORD. * Precondition: 0 < n <= UWORD_BIT */

Source from the content-addressed store, hash-verified

49 * Precondition: 0 < n <= UWORD_BIT
50 */
51static inline UWORD LSBkeep(UWORD x, size_t n) {
52 return (UWORD)(x & (UWORD_MAX >> (UWORD_BIT - n)));
53}
54#endif

Callers 2

frame.cFile · 0.85
copyBitsHelperFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected