MCPcopy Index your code
hub / github.com/Shopify/go-lua / OptNumber

Function OptNumber

auxiliary.go:342–347  ·  view source on GitHub ↗
(l *State, index int, def float64)

Source from the content-addressed store, hash-verified

340}
341
342func OptNumber(l *State, index int, def float64) float64 {
343 if l.IsNoneOrNil(index) {
344 return def
345 }
346 return CheckNumber(l, index)
347}
348
349func CheckInteger(l *State, index int) int {
350 i, ok := l.ToInteger(index)

Callers 2

io.goFile · 0.85
os.goFile · 0.85

Calls 2

CheckNumberFunction · 0.85
IsNoneOrNilMethod · 0.80

Tested by

no test coverage detected