MCPcopy Index your code
hub / github.com/yuin/gopher-lua / OpenMath

Function OpenMath

mathlib.go:8–14  ·  view source on GitHub ↗
(L *LState)

Source from the content-addressed store, hash-verified

6)
7
8func OpenMath(L *LState) int {
9 mod := L.RegisterModule(MathLibName, mathFuncs).(*LTable)
10 mod.RawSetString("pi", LNumber(math.Pi))
11 mod.RawSetString("huge", LNumber(math.MaxFloat64))
12 L.Push(mod)
13 return 1
14}
15
16var mathFuncs = map[string]LGFunction{
17 "abs": mathAbs,

Callers

nothing calls this directly

Calls 4

LNumberTypeAlias · 0.85
RegisterModuleMethod · 0.80
RawSetStringMethod · 0.80
PushMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…