MCPcopy Create free account
hub / github.com/GamerHack/GamerHack.github.io / operation

Function operation

restore/75x/int64.js:142–156  ·  view source on GitHub ↗
(f, nargs)

Source from the content-addressed store, hash-verified

140 // Decorator for Int64 instance operations. Takes care
141 // of converting arguments to Int64 instances if required.
142 function operation(f, nargs) {
143 return function () {
144 if (arguments.length != nargs)
145 throw Error("Not enough arguments for function " + f.name);
146 var new_args = [];
147 for (var i = 0; i < arguments.length; i++) {
148 if (!(arguments[i] instanceof Int64)) {
149 new_args[i] = new Int64(arguments[i]);
150 } else {
151 new_args[i] = arguments[i];
152 }
153 }
154 return f.apply(this, new_args);
155 };
156 }
157
158 this.neg = operation(function neg() {
159 var ret = [];

Callers 1

Int64Function · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected