<commit_before>package slice

import "fmt"

type Layer struct {
	n          int // layer index
	z          float64
	stl        *STL
	facets     []*facet
	perimeters []*segment
	infill     []*segment
}

// used by genInfill
const (
	markWhite = iota
	markGrey
)

type segment struct {
	from, to        Vertex2 // ordered so that gcode movements are from "from" to "to"
	first, second   Vertex2 // ordered relative to some sorting line (changes throughout lifetime)
	dfirst, dsecond float64 // distance of first and second from sorting line
	mark            int     // indicates whether the segment has yet to be visited during infill
}

type Vertex2 struct {
	X, Y float64
}

func (s *segment) String() string {
	return fmt.Sprintf("%v-%v", s.from, s.to)
}
<commit_msg>add String method to Vertex2 for parity with Vertex3<commit_after>package slice

import "fmt"

type Layer struct {
	n          int // layer index
	z          float64
	stl        *STL
	facets     []*facet
	perimeters []*segment
	infill     []*segment
}

// used by genInfill
const (
	markWhite = iota
	markGrey
)

type segment struct {
	from, to        Vertex2 // ordered so that gcode movements are from "from" to "to"
	first, second   Vertex2 // ordered relative to some sorting line (changes throughout lifetime)
	dfirst, dsecond float64 // distance of first and second from sorting line
	mark            int     // indicates whether the segment has yet to be visited during infill
}

type Vertex2 struct {
	X, Y float64
}

func (v Vertex2) String() string {
	return fmt.Sprintf("(%0.3f,%0.3f)", v.X, v.Y)
}

func (s *segment) String() string {
	return fmt.Sprintf("%v-%v", s.from, s.to)
}

{'fraction_non_alphanumeric': 0.09156626506024096, 'fraction_numerical': 0.015060240963855422, 'mean_word_length': 2.80091533180778, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4371393', 'n_tokens_mistral': 544, 'n_tokens_neox': 523, 'n_words': 207}