// Coords returns all of g's coordinates.
500266
func (g *geom2) Coords() [][]Coord {
	return inflate2(g.flatCoords, 0, g.ends, g.stride)
}
138492
func (b *Bounds) SetCoords(min, max Coord) *Bounds {
	b.min = Coord(make([]float64, b.layout.Stride()))
	b.max = Coord(make([]float64, b.layout.Stride()))
	for i := 0; i < b.layout.Stride(); i++ {
		b.min[i] = math.Min(min[i], max[i])
		b.max[i] = math.Max(min[i], max[i])
	}
	return b
}
24644
func Equals(point1, other geom.Coord) bool {
	return (point1[0] == other[0]) && (point1[1] == other[1]) &&
		((point1[2] == other[2]) ||
			(math.IsNaN(point1[2]) && math.IsNaN(other[2])))
}
854682
func (t *MultiPoint) AddCoordinates(p ...Coordinate) {
	t.Coordinates = append(t.Coordinates, p...)
}
119342
func (c *Client) checkCoordinate(coord *Coordinate) error {
	if !c.coord.IsCompatibleWith(coord) {
		return fmt.Errorf("dimensions aren't compatible")
	}

	if !coord.IsValid() {
		return fmt.Errorf("coordinate is invalid")
	}

	return nil
}
999485
func WriteFlatCoords2(w io.Writer, byteOrder binary.ByteOrder, flatCoords []float64, ends []int, stride int) error {
	if err := WriteUInt32(w, byteOrder, uint32(len(ends))); err != nil {
		return err
	}
	offset := 0
	for _, end := range ends {
		if err := WriteFlatCoords1(w, byteOrder, flatCoords[offset:end], stride); err != nil {
			return err
		}
		offset = end
	}
	return nil
}
539227
func (m *Model) Coses(pairs [][2]Expr) ([]float32, error) {
	out := make([]float32, len(pairs))
	for i, p := range pairs {
		c, err := m.Cos(p[0], p[1])
		if err != nil {
			return nil, err
		}
		out[i] = c
	}
	return out, nil
}
138896
function orderCoords(coords){
  if (config.coordinateOrder){
    return coords;
  }
  if (coords[2]){
    return [coords[1], coords[0], coords[2]];
  }
  return coords.reverse();
}
834772
func (s *Serf) GetCoordinate() (*coordinate.Coordinate, error) {
	if !s.config.DisableCoordinates {
		return s.coordClient.GetCoordinate(), nil
	}

	return nil, fmt.Errorf("Coordinates are disabled")
}
971208
func (c *cache) Cos(x, y Expr) (float32, error) {
	xh := hashExpr(x)
	if err, ok := c.errCache[xh]; ok {
		return 0, err
	}
	yh := hashExpr(y)
	if err, ok := c.errCache[yh]; ok {
		return 0, err
	}

	if f, ok := c.cache[xh+yh]; ok {
		return f, nil
	}

	f, err := c.Coser.Cos(x, y)
	if err != nil {
		if errNotFound, ok := err.(NotFoundError); ok {
			w := errNotFound.Word
			if _, ok := x[w]; ok {
				c.errCache[xh] = err
			}
			if _, ok := y[w]; ok {
				c.errCache[yh] = err
			}
		}
		return 0, err
	}
	c.cache[xh+yh] = f
	return f, nil
}
895830
func coordSlice(cs *coordSeq) ([]Coord, error) {
	size, err := cs.size()
	if err != nil {
		return nil, err
	}
	coords := make([]Coord, size)
	for i := 0; i < size; i++ {
		x, err := cs.x(i)
		if err != nil {
			return nil, err
		}
		y, err := cs.y(i)
		if err != nil {
			return nil, err
		}
		coords[i] = Coord{X: x, Y: y}
	}
	return coords, nil
}
317452
func NewCoordinate(config *Config) *Coordinate {
	return &Coordinate{
		Vec:        make([]float64, config.Dimensionality),
		Error:      config.VivaldiErrorMax,
		Adjustment: 0.0,
		Height:     config.HeightMin,
	}
}
1083253
func (t *MultiPolygon) AddCoordinates(lines ...MultiLine) {
	t.Coordinates = append(t.Coordinates, lines...)
}
1111810
func (s *Restore) Coordinates(idx uint64, updates structs.Coordinates) error {
	for _, update := range updates {
		// Skip any bad data that may have gotten into the database from
		// a bad client in the past.
		if !update.Coord.IsValid() {
			continue
		}

		if err := s.tx.Insert("coordinates", update); err != nil {
			return fmt.Errorf("failed restoring coordinate: %s", err)
		}
	}

	if err := indexUpdateMaxTxn(s.tx, idx, "coordinates"); err != nil {
		return fmt.Errorf("failed updating index: %s", err)
	}

	return nil
}
107430
func Cos(z, x *decimal.Big) *decimal.Big {
	if z.CheckNaNs(x, nil) {
		return z
	}

	if x.IsInf(0) {
		z.Context.Conditions |= decimal.InvalidOperation
		return z.SetNaN(false)
	}

	ctx := decimal.Context{Precision: precision(z) + defaultExtraPrecision}

	negXSq, halved, ok := prepCosine(z, x, ctx)
	if !ok {
		z.Context.Conditions |= decimal.InvalidOperation
		return z.SetNaN(false)
	}

	ctx.Precision += halved
	z.Copy(BinarySplitDynamic(ctx,
		func(_ uint64) *decimal.Big { return one },
		getCosineP(negXSq),
		func(_ uint64) *decimal.Big { return one },
		getCosineQ(ctx),
	))

	// now undo the half angle bit
	for i := 0; i < halved; i++ {
		ctx.Mul(z, z, z)
		ctx.Mul(z, z, two)
		ctx.Sub(z, z, one)
	}
	ctx.Precision -= defaultExtraPrecision + halved
	return ctx.Round(z)
}
1072952
func GetCellIDStringFromCoords(x, y int) string {
	return GetCellIDStringFromCoordsWithFixed(x, y, false, false)
}
838599
func (s *MultiTermvectorItem) Positions(positions bool) *MultiTermvectorItem {
	s.positions = &positions
	return s
}