ceilingFunc is a XPath Node Set functions ceiling(node-set).
(arg query)
| 139 | |
| 140 | // ceilingFunc is a XPath Node Set functions ceiling(node-set). |
| 141 | func 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). |
| 152 | func floorFunc(arg query) func(query, iterator) interface{} { |
no test coverage detected
searching dependent graphs…