MCPcopy Create free account
hub / github.com/distributedio/titan / getFloatAndInclude

Function getFloatAndInclude

command/common.go:223–243  ·  view source on GitHub ↗
(strf string)

Source from the content-addressed store, hash-verified

221}
222
223func getFloatAndInclude(strf string) (float64, bool, error) {
224 var f float64
225 include := true
226 var err error
227 lowerStrf := strings.ToLower(strf)
228 if lowerStrf[0] == '(' {
229 include = false
230 lowerStrf = lowerStrf[1:]
231 }
232 if lowerStrf == "-inf" {
233 f = -math.MaxFloat64
234 } else if lowerStrf == "+inf" || lowerStrf == "inf" {
235 f = math.MaxFloat64
236 } else {
237 if f, err = strconv.ParseFloat(lowerStrf, 64); err != nil {
238 return f, include, err
239 }
240 }
241 return f, include, nil
242
243}
244
245func getLimitParameters(offsetCount []string) (int64, int64, error) {
246 if len(offsetCount) < 2 {

Callers 1

zAnyOrderRangeByScoreFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected