MCPcopy Create free account
hub / github.com/yuin/gopher-lua / isInteger

Function isInteger

utils.go:133–137  ·  view source on GitHub ↗
(v LNumber)

Source from the content-addressed store, hash-verified

131}
132
133func isInteger(v LNumber) bool {
134 return float64(v) == float64(int64(v))
135 //_, frac := math.Modf(float64(v))
136 //return frac == 0.0
137}
138
139func isArrayKey(v LNumber) bool {
140 return isInteger(v) && v < LNumber(int((^uint(0))>>1)) && v > LNumber(0) && v < LNumber(MaxArrayIndex)

Callers 4

StringMethod · 0.85
FormatMethod · 0.85
NextMethod · 0.85
isArrayKeyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…