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

Method lessThan

vm.go:136–151  ·  view source on GitHub ↗
(left, right value)

Source from the content-addressed store, hash-verified

134}
135
136func (l *State) lessThan(left, right value) bool {
137 if lf, ok := left.(float64); ok {
138 if rf, ok := right.(float64); ok {
139 return lf < rf
140 }
141 } else if ls, ok := left.(string); ok {
142 if rs, ok := right.(string); ok {
143 return ls < rs
144 }
145 }
146 if result, ok := l.callOrderTagMethod(left, right, tmLT); ok {
147 return result
148 }
149 l.orderError(left, right)
150 return false
151}
152
153func (l *State) lessOrEqual(left, right value) bool {
154 if lf, ok := left.(float64); ok {

Callers 3

CompareMethod · 0.95
executeSwitchMethod · 0.95
initFunction · 0.80

Calls 2

callOrderTagMethodMethod · 0.95
orderErrorMethod · 0.95

Tested by

no test coverage detected