// Put character c at (x,y)
339452
func (tb *TextBuf) Put(x, y int, c rune) {
	if x < 0 || y < 0 || x >= tb.W || y >= tb.H || c < ' ' {
		// debug.Printf("Ooooops Put(): %d, %d, %d='%c' \n", x, y, c, c)
		return
	}
	i := (tb.W+1)*y + x
	tb.Buf[i] = c
}
615046
func (self circle) at(phi float64) image.Point {
	x := self.X + int(RoundFloat64(xStretch*self.radius*math.Cos(phi)))
	y := self.Y + int(RoundFloat64(self.radius*math.Sin(phi)))
	return image.Point{X: x, Y: y}
}
1050170
func (p *Point) Set(x, y float32) *Point {
	p.X = x
	p.Y = y
	return p
}
931850
func (x *Dec) Cmp(y *Dec) int {
	xx, yy := upscale(x, y)
	return xx.UnscaledBig().Cmp(yy.UnscaledBig())
}
426164
func (ta KVProtoWriters) Put(key string, data proto.Message, opts ...PutOption) error {
	var wasError error
	for _, transport := range ta {
		err := transport.Put(key, data, opts...)
		if err != nil {
			wasError = err
		}
	}
	return wasError
}
661308
func (f Uint64Field) Put(val uint64) (err error) {
	return f.db.Put(f.key, encodeUint64(val))
}
949466
func (d *Context) PutPropString(objIndex int, key string) bool {
	__key__ := C.CString(key)
	result := int(C.duk_put_prop_string(d.duk_context, C.duk_idx_t(objIndex), __key__)) == 1
	C.free(unsafe.Pointer(__key__))
	return result
}
560054
func (k *Kernel) At(x, y int) float64 {
	return k.Matrix[y*k.Width+x]
}
170768
func set(x, y reflect.Value) {
	// don't bother if x cannot be set or y is invalid
	if !x.CanSet() || !y.IsValid() {
		return
	}
	defer func() {
		if x := recover(); x != nil {
			if s, ok := x.(string); ok &&
				(strings.Contains(s, "type mismatch") || strings.Contains(s, "not assignable")) {
				// x cannot be set to y - ignore this rewrite
				return
			}
			panic(x)
		}
	}()
	x.Set(y)
}
1244700
func (c *Cursor) Put(key, val []byte, flags uint) error {
	if len(key) == 0 {
		return c.putNilKey(flags)
	}
	vn := len(val)
	if vn == 0 {
		val = []byte{0}
	}
	ret := C.lmdbgo_mdb_cursor_put2(
		c._c,
		(*C.char)(unsafe.Pointer(&key[0])), C.size_t(len(key)),
		(*C.char)(unsafe.Pointer(&val[0])), C.size_t(len(val)),
		C.uint(flags),
	)
	return operrno("mdb_cursor_put", ret)
}
902161
func (self *qbsWrapped) Put(id int64, value interface{}, pb PBundle) (interface{}, error) {
	return self.applyPolicy(pb, func(tx *qbs.Qbs) (interface{}, error) {
		return self.put.PutQbs(id, value, pb, tx)
	})
}
175471
func (db *DB) C(name string) (*C, error) {
	if c, ok := db.cs[name]; ok {
		return c, nil
	}
	c := &C{db: db, path: filepath.Join(db.path, fmt.Sprintf(CNameFormat, name))}
	db.cs[name] = c
	return c, nil
}
1308996
func (transaction *Transaction) Put(key, value []byte) error {
	var (
		cErr   *C.char
		cKey   = byteToChar(key)
		cValue = byteToChar(value)
	)
	C.rocksdb_transaction_put(
		transaction.c, cKey, C.size_t(len(key)), cValue, C.size_t(len(value)), &cErr,
	)
	if cErr != nil {
		defer C.free(unsafe.Pointer(cErr))
		return errors.New(C.GoString(cErr))
	}
	return nil
}
252369
func (ctx *ResourceContext) Put(name string, value interface{}) *ResourceContext {
	if ctx.Values == nil {
		ctx.Values = make(map[string]interface{})
	}
	ctx.Values[name] = value
	return ctx
}
226291
func Move(x, y int) {
	cx := C.size_t(x)
	cy := C.size_t(y)
	C.move_mouse(cx, cy)
}
71587
func (t *Text) PrintCharSpacing() {
	fmt.Printf("\n%s:\n", t.String)
	at := t.X1.X
	for i, cs := range t.CharSpacing {
		at = cs + at
		fmt.Printf("'%c': %.2f ", t.String[i], at)
	}
}
163677
func (x Pol) Add(y Pol) Pol {
	r := Pol(uint64(x) ^ uint64(y))
	return r
}