INNER CODE UNIT · C++

res

margelo/react-native-bignumber · cpp/MGBigNumberHostObject.cpp:403

            std::shared_ptr<MGBigNumber> res = std::make_shared<MGBigNumber>(thiz->ctx);
            BN_copy(res->bign, thiz->bign);

            if (other < 0)
            {
                BN_sub_word(res->bign, abs(other));
            }
            else
            {
                BN_add_word(res->bign, other);
            }
            return jsi::Object::createFromHostObject(runtime, res);
        }));

        this->fields.push_back(HOST_LAMBDA("isubn", {
            std::shared_ptr<MGBigNumber> thiz = thisValue.getObject(runtime).getHostObject<MGBigNumber>(runtime);
            const jsi::Value &otherValue = arguments[0];
            if (!otherValue.isNumber())

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…