MCPcopy Create free account
hub / github.com/ChiyukiGana/Quickinput / exec

Method exec

source/src/scriptinterpreter.cpp:834–839  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

832{
833 QiFunc_rand() : QiFunc(1, 2) {}
834 QiVar exec(const std::vector<QiVar>& args, QiScriptInterpreter* inter) const override
835 {
836 long long r = random((args[0].toInteger()), args.size() > 1 ? (args[1].toInteger()) : 0);
837 inter->setLocalValue(std::string("rand_last"), r);
838 return r;
839 }
840 static long long random(long long max, long long min = 0)
841 {
842 if (min > max) std::swap(min, max);

Callers

nothing calls this directly

Calls 3

toIntegerMethod · 0.80
setLocalValueMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected