// NewMultiPointFlat returns a new MultiPoint with the given flat coordinates.
553906
func NewMultiPointFlat(layout Layout, flatCoords []float64) *MultiPoint {
	g := new(MultiPoint)
	g.layout = layout
	g.stride = layout.Stride()
	g.flatCoords = flatCoords
	return g
}
433116
func NewMultiLineString(coordinates MultiLine) *MultiLineString {
	if coordinates == nil {
		coordinates = make(MultiLine, 0, INIT_GEOM_CAP)
	}
	return &MultiLineString{Type: "MultiLineString", Coordinates: coordinates}
}
1180454
func NewOutPointFromProto(op *lnrpc.OutPoint) OutPoint {
	return OutPoint(fmt.Sprintf("%s:%d", op.TxidStr, op.OutputIndex))
}
865723
func NewFlatCoordSorting(layout geom.Layout, coordData []float64, comparator IsLess) FlatCoord {
	return FlatCoord{
		isLess: comparator,
		coords: coordData,
		layout: layout,
		stride: layout.Stride(),
	}
}
1119563
func NewMultisigAddress(digests Trytes, spongeFunc ...SpongeFunction) (*MultisigAddress, error) {
	h := GetSpongeFunc(spongeFunc, kerl.NewKerl)

	m := &MultisigAddress{h: h}
	if len(digests) != 0 {
		if err := m.Absorb(digests); err != nil {
			return nil, err
		}
	}
	return m, nil
}
787965
func NewLocalPositionSetpoint(X float32, Y float32, Z float32, YAW float32, COORDINATE_FRAME uint8) *LocalPositionSetpoint {
	m := LocalPositionSetpoint{}
	m.X = X
	m.Y = Y
	m.Z = Z
	m.YAW = YAW
	m.COORDINATE_FRAME = COORDINATE_FRAME
	return &m
}
331707
func (c *Collector) PostMultipart(URL string, requestData map[string][]byte) error {
	boundary := randomBoundary()
	hdr := http.Header{}
	hdr.Set("Content-Type", "multipart/form-data; boundary="+boundary)
	hdr.Set("User-Agent", c.UserAgent)
	return c.scrape(URL, "POST", 1, createMultipartReader(boundary, requestData), nil, hdr, true)
}
861619
func (g *MultiPoint) Point(i int) *Point {
	return NewPointFlat(g.layout, g.Coord(i))
}
1055997
func CreateMultipartMetadata(metadata map[string]string) map[string]string {
	if metadata == nil {
		metadata = map[string]string{}
	}
	metadata[SSEMultipart] = ""
	return metadata
}
1019515
func NewFlatCoordSorting2D(layout geom.Layout, coordData []float64) FlatCoord {
	return NewFlatCoordSorting(layout, coordData, IsLess2D)
}
1368941
func NewMultiReaderAt(parts ...SizeReaderAt) SizeReaderAt {
	m := &multiRA{
		parts: make([]offsetAndSource, 0, len(parts)),
	}
	var off int64
	for _, p := range parts {
		m.parts = append(m.parts, offsetAndSource{off, p})
		off += p.Size()
	}
	m.size = off
	return m
}
1263188
func (s *Server) CreateMetricsEndpoint() (*http.ServeMux, error) {
	metrics.Register()
	mux := &http.ServeMux{}
	mux.Handle("/metrics", promhttp.Handler())
	return mux, nil
}
454475
func MultiPointFromBytes(bytes []byte) (*MultiPoint, error) {
	var result MultiPoint
	err := json.Unmarshal(bytes, &result)
	return &result, err
}
604445
func NewBoundFromPoints(corner, oppositeCorner *Point) *Bound {
	b := &Bound{
		sw: corner.Clone(),
		ne: corner.Clone(),
	}

	b.Extend(oppositeCorner)
	return b
}
231087
func (s *Surface) GradientAt(point *Point) *Point {
	if !s.bound.Contains(point) {
		return NewPoint(0, 0)
	}

	xi, yi, deltaX, deltaY := s.gridCoordinate(point)

	xi1 := xi + 1
	if limit := s.Width - 1; xi1 > limit {
		xi = limit - 1
		xi1 = limit
		deltaX = 1.0
	}

	yi1 := yi + 1
	if limit := s.Height - 1; yi1 > limit {
		yi = limit - 1
		yi1 = limit
		deltaY = 1.0
	}

	u1 := s.Grid[xi][yi]*(1-deltaX) + s.Grid[xi1][yi]*deltaX
	u2 := s.Grid[xi][yi1]*(1-deltaX) + s.Grid[xi1][yi1]*deltaX

	w1 := (1 - deltaY) * (s.Grid[xi1][yi] - s.Grid[xi][yi])
	w2 := deltaY * (s.Grid[xi1][yi1] - s.Grid[xi][yi1])

	return NewPoint((w1+w2)/s.gridBoxWidth(), (u2-u1)/s.gridBoxHeight())
}
459557
func NewGlobalPositionSetpointExternalInt(TIME_BOOT_MS uint32, LAT_INT int32, LON_INT int32, ALT float32, VX float32, VY float32, VZ float32, AFX float32, AFY float32, AFZ float32, TYPE_MASK uint16, TARGET_SYSTEM uint8, TARGET_COMPONENT uint8) *GlobalPositionSetpointExternalInt {
	m := GlobalPositionSetpointExternalInt{}
	m.TIME_BOOT_MS = TIME_BOOT_MS
	m.LAT_INT = LAT_INT
	m.LON_INT = LON_INT
	m.ALT = ALT
	m.VX = VX
	m.VY = VY
	m.VZ = VZ
	m.AFX = AFX
	m.AFY = AFY
	m.AFZ = AFZ
	m.TYPE_MASK = TYPE_MASK
	m.TARGET_SYSTEM = TARGET_SYSTEM
	m.TARGET_COMPONENT = TARGET_COMPONENT
	return &m
}
855869
func (a *azureObjects) NewMultipartUpload(ctx context.Context, bucket, object string, opts minio.ObjectOptions) (uploadID string, err error) {
	uploadID, err = getAzureUploadID()
	if err != nil {
		logger.LogIf(ctx, err)
		return "", err
	}
	metadataObject := getAzureMetadataObjectName(object, uploadID)

	var jsonData []byte
	if jsonData, err = json.Marshal(azureMultipartMetadata{Name: object, Metadata: opts.UserDefined}); err != nil {
		logger.LogIf(ctx, err)
		return "", err
	}

	blob := a.client.GetContainerReference(bucket).GetBlobReference(metadataObject)
	err = blob.CreateBlockBlobFromReader(bytes.NewBuffer(jsonData), nil)
	if err != nil {
		return "", azureToObjectError(err, bucket, metadataObject)
	}

	return uploadID, nil
}