测试:补 rond 合并冲突与 gpx 解析用例,删两处死代码

This commit is contained in:
tamakyi
2026-09-24 22:48:22 +08:00
parent c001e64ee0
commit 05c6e970db
4 changed files with 251 additions and 22 deletions
-20
View File
@@ -125,26 +125,6 @@ func (t Track) LengthKm() float64 {
return sum
}
// BBox 返回 [minLon, minLat, maxLon, maxLat]。
func (t Track) BBox() [4]float64 {
b := [4]float64{180, 90, -180, -90}
for _, p := range t.Points {
if p.Lon < b[0] {
b[0] = p.Lon
}
if p.Lat < b[1] {
b[1] = p.Lat
}
if p.Lon > b[2] {
b[2] = p.Lon
}
if p.Lat > b[3] {
b[3] = p.Lat
}
}
return b
}
func haversine(a, b Point) float64 {
const r = 6371.0
dLat := (b.Lat - a.Lat) * math.Pi / 180