// NewBBox creates a bbox from a a bound.
334437
func NewBBox(b orb.Bound) BBox {
	return []float64{
		b.Min[0], b.Min[1],
		b.Max[0], b.Max[1],
	}
}
1254356
func NewUnbind() Body {
	b := newUnbind(&Header{ID: UnbindID})
	b.init()
	return b
}
902105
func NewObject(t ...[2]*Term) Object {
	obj := newobject(len(t))
	for i := range t {
		obj.Insert(t[i][0], t[i][1])
	}
	return obj
}
6344
func NewBoundContract(address common.Address, abi abi.ABI, caller ContractCaller, transactor ContractTransactor, filterer ContractFilterer) *BoundContract {
	return &BoundContract{
		address:    address,
		abi:        abi,
		caller:     caller,
		transactor: transactor,
		filterer:   filterer,
	}
}
570599
func NewBooleanNode(operator lex.Token, args ...Node) *BooleanNode {
	//u.Debugf("NewBinaryNode: %v %v %v", lhArg, operator, rhArg)
	return &BooleanNode{Args: args, Operator: operator}
}
859964
func NewBigNum(s string) BigNum {
	res, _ := new(big.Int).SetString(s, 16)
	return BigNum{res}
}
99427
func NewVertex(pub *btcec.PublicKey) Vertex {
	var v Vertex
	copy(v[:], pub.SerializeCompressed())
	return v
}
986035
func NewBoolValue(b bool) Value {
	value := &Value{}
	value.StoreBool(b)
	return *value
}
530815
func NewOptionBlockObject(value string, text *TextBlockObject) *OptionBlockObject {
	return &OptionBlockObject{
		Text:  text,
		Value: value,
	}
}
1325376
func newX(ch0 interface{}) *x {
	r := btXPool.Get().(*x)
	r.x[0].ch = ch0
	return r
}
796818
func NewBoolFunc(key Key, value string) (Function, error) {
	return &booleanFunc{key, value}, nil
}
767965
func (cluster *Cluster) NewBatch() *Batch {
    return &Batch{
	cluster: cluster,
	batches: make([]nodeBatch, 0),
	index: make([]int, 0),
    }
}
929353
func newX(ch0 interface{}) *x {
	r := &x{}
	r.x[0].ch = ch0
	return r
}
434363
func (dc *DispatcherClient) NewBatch() *DispatcherBatch {
	return &DispatcherBatch{
		c: dc,
		b: dc.c.NewBatch(),
	}
}
358228
func NewBox(pos vect.Vect, w, h vect.Float) *Shape {
	shape := newShape()

	box := &BoxShape{
		Polygon:  &PolygonShape{Shape: shape},
		Width:    w,
		Height:   h,
		Position: pos,
		Shape:    shape,
	}

	hw := w / 2.0
	hh := h / 2.0

	if hw < 0 {
		hw = -hw
	}
	if hh < 0 {
		hh = -hh
	}

	box.verts = [4]vect.Vect{
		{-hw, -hh},
		{-hw, hh},
		{hw, hh},
		{hw, -hh},
	}

	poly := box.Polygon
	poly.SetVerts(box.verts[:], box.Position)

	shape.ShapeClass = box
	return shape
}
1207155
func New(bs []string) (*Table, error) {
	m := make(map[string]bool)
	for _, b := range bs {
		m[b] = true
	}
	if len(m) != len(bs) {
		return nil, fmt.Errorf("table.New does not allow duplicated bindings in %s", bs)
	}
	return &Table{
		AvailableBindings: bs,
		mbs:               m,
	}, nil
}
730223
func (db *GoLevelDB) NewBatch() Batch {
	batch := new(leveldb.Batch)
	return &goLevelDBBatch{db, batch}
}