INNER CODE UNIT · Go

getNumberValue

bbuck/dragon-mud · scripting/lua_engine.go:197

func getNumberValue[TNum number](state *lua.State, index int) (TNum, bool) {
	num, ok := state.ToNumber(index)

	if !ok {
		return 0, ok
	}

	return TNum(num), ok
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…