// AddLine adds a LineString to the current calculation
513597
func (calc *LineCentroidCalculator) AddLine(line *geom.LineString) *LineCentroidCalculator {
	coords := line.FlatCoords()
	calc.addLine(coords, 0, len(coords))
	return calc
}
704830
func LineString(b orb.Bound, ls orb.LineString, opts ...Option) orb.MultiLineString {
	open := false
	if len(opts) > 0 {
		o := &options{}
		for _, opt := range opts {
			opt(o)
		}

		open = o.openBound
	}

	result := line(b, ls, open)
	if len(result) == 0 {
		return nil
	}

	return result
}
406029
func (b *Buffer) NewLine(copyMargin bool) {
	if copyMargin {
		b.InsertText("\n"+b.Document().leadingWhitespaceInCurrentLine(), false, true)
	} else {
		b.InsertText("\n", false, true)
	}
}
1033144
func newLine(no int, s string) *line {
	return &line{
		no:     no,
		s:      s,
		indent: indent(s),
	}
}
468054
func (b *buffer) deleteLine() error {
	lines, err := b.end()
	if err != nil {
		return err
	}

	for lines > 0 {
		if _, err = term.Output.Write(DelLine_cursorUp); err != nil {
			return outputError(err.Error())
		}
		lines--
	}
	return nil
}
1237637
func (l Line) Center() Vec {
	return l.A.Add(l.A.To(l.B).Scaled(0.5))
}
1280827
func (s *VisvalingamSimplifier) LineString(ls orb.LineString) orb.LineString {
	return lineString(s, ls)
}
284652
func (u *UI) Line(format string, a ...interface{}) {
	u.LineIndent(0, format, a...)
}
209667
func NewLine(args ...interface{}) Composer {
	m := &lineMessenger{}
	for _, arg := range args {
		if arg != nil {
			m.lines = append(m.lines, arg)
		}
	}

	return m
}
856937
func (d *DotGit) processLine(line string) (*plumbing.Reference, error) {
	if len(line) == 0 {
		return nil, nil
	}

	switch line[0] {
	case '#': // comment - ignore
		return nil, nil
	case '^': // annotated tag commit of the previous line - ignore
		return nil, nil
	default:
		ws := strings.Split(line, " ") // hash then ref
		if len(ws) != 2 {
			return nil, ErrPackedRefsBadFormat
		}

		return plumbing.NewReferenceFromStrings(ws[1], ws[0]), nil
	}
}
193044
func (g *MultiLineString) LineString(i int) *LineString {
	offset := 0
	if i > 0 {
		offset = g.ends[i-1]
	}
	return NewLineStringFlat(g.layout, g.flatCoords[offset:g.ends[i]])
}
1286629
func Lines(l int) Option {
	return func(s *Scroller) error {
		if l < 0 {
			return errors.New(ErrNegativeLines, errorMessages, l)
		}
		s.lines = l
		return nil
	}
}
67196
func (t *Tabulate) buildLine(padded_widths []int, padding []int, l Line) string {
	cells := make([]string, len(padded_widths))

	for i, _ := range cells {
		b := createBuffer()
		b.Write(l.hline, padding[i]+MIN_PADDING)
		cells[i] = b.String()
	}

	var buffer bytes.Buffer
	buffer.WriteString(l.begin)

	// Print contents
	for i := 0; i < len(cells); i++ {
		buffer.WriteString(cells[i])
		if i != len(cells)-1 {
			buffer.WriteString(l.sep)
		}
	}

	buffer.WriteString(l.end)
	return buffer.String()
}
460459
func (r Rect) AddPoint(ll LatLng) Rect {
	if !ll.IsValid() {
		return r
	}
	return Rect{
		Lat: r.Lat.AddPoint(ll.Lat.Radians()),
		Lng: r.Lng.AddPoint(ll.Lng.Radians()),
	}
}
823061
func (s *Position) SetLine(v int64) *Position {
	s.Line = &v
	return s
}
833131
func (g *Group) WriteLine(line string) error {
	g.mtx.Lock()
	defer g.mtx.Unlock()
	_, err := g.headBuf.Write([]byte(line + "\n"))
	return err
}
570853
func (w Wrapper) line(s string, limit int) string {
	if limit < 1 || utf8.RuneCountInString(s) < limit+1 {
		return w.OutputLinePrefix + s + w.OutputLineSuffix
	}

	// Find the index of the last breakpoint within the limit.
	i := strings.LastIndexAny(s[:limit+1], w.Breakpoints)

	// Can't wrap within the limit, wrap at the next breakpoint instead.
	if i < 0 {
		i = strings.IndexAny(s, w.Breakpoints)
		// Nothing left to do!
		if i < 0 {
			return w.OutputLinePrefix + s + w.OutputLineSuffix
		}
	}

	// Recurse until we have nothing left to do.
	return w.OutputLinePrefix + s[:i] + w.OutputLineSuffix + w.Newline + w.line(s[i+1:], limit)
}