// length of the imaginary non-circular buffer
559644
func (b *circularRuneBuffer) length() int {
	return len(b.runes) + int(b.offset)
}
427542
func (pq *PriorityQueue) Length() uint64 {
	pq.RLock()
	defer pq.RUnlock()

	var length uint64
	for _, v := range pq.levels {
		length += v.length()
	}

	return length
}
1156645
func (p *Pixbuf) GetPixelsWithLength() []byte {
	panic_if_version_older(2, 26, 0, "gdk_pixbuf_get_pixels_with_length()")
	length := C.guint(0)
	ptr := C._gdk_pixbuf_get_pixels_with_length(
		p.GPixbuf,
		&length,
	)
	return (*[1 << 30]byte)(unsafe.Pointer(ptr))[:length]
}
327187
func (f *StreamDataBlockedFrame) Length(version protocol.VersionNumber) protocol.ByteCount {
	return 1 + utils.VarIntLen(uint64(f.StreamID)) + utils.VarIntLen(uint64(f.DataLimit))
}
857053
func (f *MaxDataFrame) Length(version protocol.VersionNumber) protocol.ByteCount {
	return 1 + utils.VarIntLen(uint64(f.ByteOffset))
}
736550
func (f *NewConnectionIDFrame) Length(protocol.VersionNumber) protocol.ByteCount {
	return 1 + utils.VarIntLen(f.SequenceNumber) + 1 /* connection ID length */ + protocol.ByteCount(f.ConnectionID.Len()) + 16
}
886270
func (f *AckFrame) Length(version protocol.VersionNumber) protocol.ByteCount {
	largestAcked := f.AckRanges[0].Largest
	numRanges := f.numEncodableAckRanges()

	length := 1 + utils.VarIntLen(uint64(largestAcked)) + utils.VarIntLen(encodeAckDelay(f.DelayTime))

	length += utils.VarIntLen(uint64(numRanges - 1))
	lowestInFirstRange := f.AckRanges[0].Smallest
	length += utils.VarIntLen(uint64(largestAcked - lowestInFirstRange))

	for i := 1; i < numRanges; i++ {
		gap, len := f.encodeAckRange(i)
		length += utils.VarIntLen(gap)
		length += utils.VarIntLen(len)
	}
	return length
}
1344169
func (s *OIDSet) Length() int {
	if s == nil {
		return 0
	}
	return int(s.C_gss_OID_set.count)
}
908342
func (ri *readerOffsetsIterator) Length(b *faultBuffer) uint16 {
	if ri.ks.length == 0 {
		buf := b.access(ri.Offset(), 2)
		ri.ks.length = uint16(buf[0])<<8 | uint16(buf[1])
	}
	return ri.ks.length
}
30728
func (self *Collection) LengthAttribute() IntegerAttribute {
	result := &computedLength{
		NewAttribute(VALUE_ONLY, self.length, nil), self,
	}
	return result
}
238584
func intLength(bits, base int) int {
	return int(math.Ceil(float64(bits) * math.Log10(2.0) / math.Log10(float64(base))))
}
195841
func (vec *T) LengthSqr() float64 {
	return vec[0]*vec[0] + vec[1]*vec[1] + vec[2]*vec[2]
}
364557
func (b *buffer) takeBuffer(length int) []byte {
	if b.length > 0 {
		return nil
	}

	// test (cheap) general case first
	if length <= defaultBufSize || length <= cap(b.buf) {
		return b.buf[:length]
	}

	if length < maxPacketSize {
		b.buf = make([]byte, length)
		return b.buf
	}
	return make([]byte, length)
}
1209447
func (g *LineString) Length() float64 {
	return length1(g.flatCoords, 0, len(g.flatCoords), g.stride)
}
447515
func (s *RedisQueueStore) Length(key string) (int, error) {
	if !strings.HasPrefix(key, s.prefix) {
		key = s.prefix + key
	}
	res, err := s.client.LLen(key).Result()
	if err == redis.Nil {
		return int(res), nil
	}
	return int(res), err
}
544998
func Length(pointA, tangentA, pointB, tangentB *vec3.T, t float64) float64 {
	sqrT := t * t
	t1 := sqrT * 0.5
	t2 := sqrT * t * 1.0 / 3.0
	t3 := sqrT*sqrT + 1.0/4.0

	f := 2*t3 - 3*t2 + t
	result := pointA.Scaled(f)

	f = t3 - 2*t2 + t1
	tAf := tangentA.Scaled(f)
	result.Add(&tAf)

	f = t3 - t2
	tBf := tangentB.Scaled(f)
	result.Add(&tBf)

	f = -2*t3 + 3*t2
	pBf := pointB.Scaled(f)
	result.Add(&pBf)

	return result.Length()
}
618882
func (c *PCPClient) Length() int {
	var (
		InstanceLength = Instance1Length
		MetricLength   = Metric1Length
	)

	if c.r.version2 {
		InstanceLength = Instance2Length
		MetricLength = Metric2Length
	}

	return HeaderLength +
		(c.tocCount() * TocLength) +
		(c.r.InstanceCount() * InstanceLength) +
		(c.r.InstanceDomainCount() * InstanceDomainLength) +
		(c.r.MetricCount() * MetricLength) +
		(c.r.ValuesCount() * ValueLength) +
		(c.r.StringCount() * StringLength)
}