Skip to content
This repository was archived by the owner on Nov 27, 2018. It is now read-only.

MathLibrary

Francesco Bertolaccini edited this page Dec 6, 2013 · 1 revision

MathLibrary is a static class which can be used to add math.* functions to your Lua context.

Use

var lua = new NetLua.Lua();
NetLua.MathLibrary.AddMathLibrary(lua.Context);

lua.DoString("a = math.sin(math.PI / 2)");

Methods

Its only static method is AddMathLibrary that takes the LuaContext which the library should be added to.

NOTE: Not all the standard methods are still implemented

Clone this wiki locally