<commit_before>package geo

import (
	"math"
)

type Projecter struct {
	Project func(p *Point) *Point
	Inverse func(p *Point) *Point
}

var Mercator = Projecter{
	Project: func(p *Point) *Point {
		p.SetLng(math.Pi / 180.0 * p.Lng())

		radLat := math.Pi / 180.0 * p.Lat()
		p.SetLat(math.Log(math.Tan(math.Pi/4 + radLat/2.0)))

		return p
	},
	Inverse: func(p *Point) *Point {
		p.SetLng(p.Lng() * 180.0 / math.Pi)

		radLat := 2.0*math.Atan(math.Exp(p.Lat())) - (math.Pi / 2.0)
		p.SetLat(radLat * 180.0 / math.Pi)

		return p
	},
}

var ScalarMercator struct {
	Level   uint
	Project func(lat, lng float64) (x, y uint64)
	Inverse func(x, y uint64) (lat, lng float64)
}

func init() {
	ScalarMercator.Level = 31
	ScalarMercator.Project = scalarMercatorProject
	ScalarMercator.Inverse = scalarMercatorInverse
}

func scalarMercatorProject(lat, lng float64) (x, y uint64) {
	var factor uint64
	factor = 1 << ScalarMercator.Level<commit_msg>Consistent ScalarMercator data types<commit_after>package geo

import (
	"math"
)

type Projecter struct {
	Project func(p *Point) *Point
	Inverse func(p *Point) *Point
}

var Mercator = Projecter{
	Project: func(p *Point) *Point {
		p.SetLng(math.Pi / 180.0 * p.Lng())

		radLat := math.Pi / 180.0 * p.Lat()
		p.SetLat(math.Log(math.Tan(math.Pi/4 + radLat/2.0)))

		return p
	},
	Inverse: func(p *Point) *Point {
		p.SetLng(p.Lng() * 180.0 / math.Pi)

		radLat := 2.0*math.Atan(math.Exp(p.Lat())) - (math.Pi / 2.0)
		p.SetLat(radLat * 180.0 / math.Pi)

		return p
	},
}

var ScalarMercator struct {
	Level   uint64
	Project func(lat, lng float64) (x, y uint64)
	Inverse func(x, y uint64) (lat, lng float64)
}

func init() {
	ScalarMercator.Level = 31
	ScalarMercator.Project = scalarMercatorProject
	ScalarMercator.Inverse = scalarMercatorInverse
}

func scalarMercatorProject(lat, lng float64) (x, y uint64) {
	var factor uint64
	factor = 1 << ScalarMercator.Level
{'fraction_non_alphanumeric': 0.14682747771368643, 'fraction_numerical': 0.04299947561615102, 'mean_word_length': 3.6995073891625614, 'pattern_counts': {'":': 0, '<': 7, '<?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': '5725111', 'n_tokens_mistral': 867, 'n_tokens_neox': 789, 'n_words': 180}