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

Function CheckNumber

auxiliary.go:334–340  ·  view source on GitHub ↗
(l *State, index int)

Source from the content-addressed store, hash-verified

332}
333
334func CheckNumber(l *State, index int) float64 {
335 n, ok := l.ToNumber(index)
336 if !ok {
337 tagError(l, index, TypeNumber)
338 }
339 return n
340}
341
342func OptNumber(l *State, index int, def float64) float64 {
343 if l.IsNoneOrNil(index) {

Callers 7

formatHelperFunction · 0.85
mathUnaryOpFunction · 0.85
mathBinaryOpFunction · 0.85
reduceFunction · 0.85
math.goFile · 0.85
OptNumberFunction · 0.85
os.goFile · 0.85

Calls 2

tagErrorFunction · 0.85
ToNumberMethod · 0.80

Tested by

no test coverage detected