public LuaValue call(LuaValue modname, LuaValue env) { super.call(modname, env); LuaValue math = env.get("math"); math.set("acos", new acos()); math.set("asin", new asin()); math.set("atan", new atan()); math.set("atan2", new atan2()); math.set("cosh", new cosh()); math.set("exp", new exp()); math.set("log", new log()); math.set("pow", new pow()); math.set("sinh", new sinh()); math.set("tanh", new tanh()); return math; }
public LuaValue powWith(int lhs) { return MathLib.dpow(lhs, checkarith()); }
public LuaValue pow(int rhs) { return MathLib.dpow(checkarith(), rhs); }