INNER CODE UNIT · C++
temp
margelo/react-native-bignumber · cpp/MGBigNumberHostObject.cpp:365
unsigned long temp = BN_get_word(thiz->bign);
long long value = temp;
value *= (neg) ? -1 : 1;
return jsi::Value(runtime, (double)value);
}));
// with number
this->fields.push_back(HOST_LAMBDA("iaddn", {
std::shared_ptr<MGBigNumber> thiz = thisValue.getObject(runtime).getHostObject<MGBigNumber>(runtime);
const jsi::Value &otherValue = arguments[0];
if (!otherValue.isNumber())
{
throw jsi::JSError(runtime, "iaddn expects integer");
}
int other = otherValue.asNumber();
if (other < 0)