// Length returns the length of a cubic bezier spline from A.Point to t (0,1).
498280
func (bez *T) Length(t float64) float64 {
	return Length(&bez.P0, &bez.P1, &bez.P2, &bez.P3, t)
}
1209447
func (g *LineString) Length() float64 {
	return length1(g.flatCoords, 0, len(g.flatCoords), g.stride)
}
164231
func Distance(a, b *T) float64 {
	d := Sub(a, b)
	return d.Length()
}
1174578
func (op *op) size() int {
	if op.typ == opTypeAdd || op.typ == opTypeRemove {
		return 1 + 8 + 4
	}
	return 1 + 8 + 4 + len(op.values)*8
}
267858
func (e JSONEvent) Length() int {
	bytes, _ := e.Encode()
	return len(bytes)
}
1081394
func (s *SeriesCollection) Length() int {
	switch {
	case s.Points != nil:
		return len(s.Points)
	case s.Keys != nil:
		return len(s.Keys)
	case s.SeriesKeys != nil:
		return len(s.SeriesKeys)
	case s.Names != nil:
		return len(s.Names)
	case s.Tags != nil:
		return len(s.Tags)
	case s.Types != nil:
		return len(s.Types)
	case s.SeriesIDs != nil:
		return len(s.SeriesIDs)
	default:
		return 0
	}
}
1143925
func (pc PrefixCodes) Length() (nb uint) {
	for _, c := range pc {
		nb += uint(c.Len * c.Cnt)
	}
	return nb
}
1159858
func Distance(a, b *T) float32 {
	d := Sub(a, b)
	return d.Length()
}
546720
func (g *Gui) Size() (x, y int) {
	return g.maxX, g.maxY
}
964525
func Length(collection cty.Value) (cty.Value, error) {
	return LengthFunc.Call([]cty.Value{collection})
}
1111052
func (t *TextBar) Size() (int, int) {
	w, h := 0, 0

	ww, wh := t.left.Size()
	w += ww
	if wh > h {
		h = wh
	}
	ww, wh = t.center.Size()
	w += ww
	if wh > h {
		h = wh
	}
	ww, wh = t.right.Size()
	w += ww
	if wh > h {
		h = wh
	}
	return w, h
}
1181373
func (f *ConnectionCloseFrame) Length(version protocol.VersionNumber) protocol.ByteCount {
	length := 1 + 2 + utils.VarIntLen(uint64(len(f.ReasonPhrase))) + protocol.ByteCount(len(f.ReasonPhrase))
	if !f.IsApplicationError {
		length++ // for the frame type
	}
	return length
}
308945
func BezierCurve3D(t float64, cPoints []Vec3) Vec3 {
	if t < 0.0 || t > 1.0 {
		panic("Input to bezier has t not in range [0,1]. If you think this is a precision error, use mathgl.Clamp[f|d] before calling this function")
	}

	n := len(cPoints) - 1
	point := cPoints[0].Mul(float64(math.Pow(float64(1.0-t), float64(n))))

	for i := 1; i <= n; i++ {
		point = point.Add(cPoints[i].Mul(float64(float64(choose(n, i)) * math.Pow(float64(1-t), float64(n-i)) * math.Pow(float64(t), float64(i))))) // P += P_i * nCi * (1-t)^(n-i) * t^i
	}

	return point
}
278664
func (vec *T) LengthSqr() float32 {
	return vec[0]*vec[0] + vec[1]*vec[1] + vec[2]*vec[2]
}
106493
func (g *MultiPolygon) Length() float64 {
	return length3(g.flatCoords, 0, g.endss, g.stride)
}
1216642
func ValidateLengths(lens ...lengther) (int, error) {
	lenLen := len(lens)
	if lenLen == 0 {
		return 0, nil
	}
	firstLen := lens[0].Length()
	shortest := firstLen
	for i, l := range lens[1:lenLen] {
		dLen := l.Length()
		if dLen < firstLen {
			log.Warnf("charts.ValidateLengths: dataset at index %d has mismatched length %d != %d", i+1, dLen, firstLen)
			if dLen < shortest {
				shortest = dLen
			}
		}
	}
	if shortest < firstLen {
		return shortest, fmt.Errorf("data length mismatch")
	}
	return firstLen, nil
}
252389
func (c *Container) Length() int {
	nc := c
	var l int
	for nc != nil {
		l += nc.length
		nc = nc.next
	}
	return l
}