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

Function pad

src/simplicity/bounded.h:29–31  ·  view source on GitHub ↗

'pad(false, a, b)' computes the PADL(a, b) function. * 'pad( true, a, b)' computes the PADR(a, b) function. */

Source from the content-addressed store, hash-verified

27 * 'pad( true, a, b)' computes the PADR(a, b) function.
28 */
29static inline ubounded pad(bool right, ubounded a, ubounded b) {
30 return bounded_max(a, b) - (right ? b : a);
31}
32
33enum { overhead = 100 }; /* milli weight units */
34#endif

Callers 2

writeValueFunction · 0.85
runTCOFunction · 0.85

Calls 1

bounded_maxFunction · 0.85

Tested by

no test coverage detected