// ArrayOfFloats extracts an array of float64s from some json
13125
func (j *JsonQuery) ArrayOfFloats(s ...string) ([]float64, error) {
	array, err := j.Array(s...)
	if err != nil {
		return []float64{}, err
	}
	toReturn := make([]float64, len(array))
	for index, val := range array {
		toReturn[index], err = floatFromInterface(val)
		if err != nil {
			return toReturn, err
		}
	}
	return toReturn, nil
}
1298927
func DatapointValueToFloat64(value interface{}) (float64, error) {
	switch value := value.(type) {
	case float64:
		return value, nil
	case float32:
		return float64(value), nil
	case int64:
		return float64(value), nil
	case int32:
		return float64(value), nil
	case int:
		return float64(value), nil
	case string:
		return strconv.ParseFloat(value, 64)
	}
	return math.NaN(), fmt.Errorf("Could not convert %+v (%T) to float64", value, value)
}
709097
func (dec *Decoder) SliceFloat64(s *[]float64) error {
	err := dec.Array(DecodeArrayFunc(func(dec *Decoder) error {
		var i float64
		if err := dec.Float64(&i); err != nil {
			return err
		}
		*s = append(*s, i)
		return nil
	}))

	if err != nil {
		return err
	}
	return nil
}
206763
func ParseFloat(b []byte) (float64, error) {
	if v, err := parseFloat(&b); err != nil {
		return 0, MalformedValueError
	} else {
		return v, nil
	}
}
807414
func ArrayToCFArray(a []C.CFTypeRef) C.CFArrayRef {
	var values []unsafe.Pointer
	for _, value := range a {
		values = append(values, unsafe.Pointer(value))
	}
	numValues := len(values)
	var valuesPointer *unsafe.Pointer
	if numValues > 0 {
		valuesPointer = &values[0]
	}
	return C.CFArrayCreate(nil, valuesPointer, C.CFIndex(numValues), &C.kCFTypeArrayCallBacks)
}
524041
func arrayFromScalar(val interface{}, length int) []interface{} {
	ret := make([]interface{}, length)
	for i := range ret {
		ret[i] = val
	}
	return ret
}
340569
func (j *JsonQuery) ArrayOfStrings(s ...string) ([]string, error) {
	array, err := j.Array(s...)
	if err != nil {
		return []string{}, err
	}
	toReturn := make([]string, len(array))
	for index, val := range array {
		toReturn[index], err = stringFromInterface(val)
		if err != nil {
			return toReturn, err
		}
	}
	return toReturn, nil
}
326109
func (j *JsonQuery) ArrayOfObjects(s ...string) ([]map[string]interface{}, error) {
	array, err := j.Array(s...)
	if err != nil {
		return []map[string]interface{}{}, err
	}
	toReturn := make([]map[string]interface{}, len(array))
	for index, val := range array {
		toReturn[index], err = objectFromInterface(val)
		if err != nil {
			return toReturn, err
		}
	}
	return toReturn, nil
}
58282
func (c *Context) PolygonOffset(factor, units float64) {
	c.Call("polygonOffset", factor, units)
}
908752
func arrayFirst(input interface{}) interface{} {
	if input == nil {
		return nil
	}

	arr := reflect.ValueOf(input)

	if arr.Len() == 0 {
		return nil
	}

	return arr.Index(0).Interface()
}
1351259
func (k *Key) Float64s(delim string) []float64 {
	vals, _ := k.parseFloat64s(k.Strings(delim), true, false)
	return vals
}
506814
func (d *Drain) ArrayArray(ps ProxySet) [][]interface{} {
	v, err := ps.ArrayArray()
	d.put(err)
	return v
}
1133174
func Arr() *Array {
	a := arrayPool.Get().(*Array)
	a.buf = a.buf[:0]
	return a
}
275419
func ParseFloat64(valueString string) (float64, error) {
	if valueString == "" {
		return 0.0, nil
	}
	valueString = strings.Replace(valueString, ",", "", -1)
	return strconv.ParseFloat(valueString, 64)
}
781427
func (d *Drain) Float64Array(ps ProxySet) []float64 {
	v, err := ps.Float64Array()
	d.put(err)
	return v
}
603735
func addArrays(a, b []interface{}) []interface{} {
	if len(a) == 0 && len(b) == 0 {
		return []interface{}{}
	}
	n := len(a) + len(b)
	ret := make([]interface{}, 0, n)
	ret = append(ret, a...)
	ret = append(ret, b...)
	return ret
}
36257
func arrayClosest(values []string, input string) string {
	best := ""
	for _, v := range values {
		if strings.Contains(input, v) && len(v) > len(best) {
			best = v
		}
	}
	return best
}