MCPcopy Create free account
hub / github.com/antchfx/xpath / ceilingFunc

Function ceilingFunc

func.go:141–149  ·  view source on GitHub ↗

ceilingFunc is a XPath Node Set functions ceiling(node-set).

(arg query)

Source from the content-addressed store, hash-verified

139
140// ceilingFunc is a XPath Node Set functions ceiling(node-set).
141func ceilingFunc(arg query) func(query, iterator) interface{} {
142 return func(_ query, t iterator) interface{} {
143 val := asNumber(t, functionArgs(arg).Evaluate(t))
144 // if math.IsNaN(val) {
145 // panic(errors.New("ceiling() function argument type must be a valid number"))
146 // }
147 return math.Ceil(val)
148 }
149}
150
151// floorFunc is a XPath Node Set functions floor(node-set).
152func floorFunc(arg query) func(query, iterator) interface{} {

Callers 1

processFunctionMethod · 0.85

Calls 3

asNumberFunction · 0.85
functionArgsFunction · 0.85
EvaluateMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…