secp256k1I128CheckPow2 static method

int secp256k1I128CheckPow2(
  1. Secp256k1Int128 r,
  2. int n,
  3. int sign
)

Implementation

static int secp256k1I128CheckPow2(Secp256k1Int128 r, int n, int sign) {
  _cond(n < 127, "secp256k1I128CheckPow2");
  _cond(sign == 1 || sign == -1, "secp256k1I128CheckPow2");
  return (r.r == ((sign.toBigInt << n).toUnsigned128).toSigned128).toInt;
}