public static void Load(Script script) { ScriptTable Table = script.CreateTable(); Table.SetValue("encode", script.CreateFunction(new encode())); Table.SetValue("decode", script.CreateFunction(new decode(script))); script.SetObjectInternal("json", Table); }
public static void Load(Script script) { ScriptTable Table = script.CreateTable(); Table.SetValue("PI", script.CreateNumber(PI)); Table.SetValue("Deg2Rad", script.CreateNumber(Deg2Rad)); Table.SetValue("Rad2Deg", script.CreateNumber(Rad2Deg)); Table.SetValue("Epsilon", script.CreateNumber(Epsilon)); Table.SetValue("min", script.CreateFunction(new min())); Table.SetValue("max", script.CreateFunction(new max())); Table.SetValue("abs", script.CreateFunction(new abs())); Table.SetValue("floor", script.CreateFunction(new floor())); script.SetObjectInternal("math", Table); }