aboutsummaryrefslogtreecommitdiff
path: root/geo/interval.go
diff options
context:
space:
mode:
authorMartin Kagamino Lehoux <martin@lehoux.net>2026-08-27 12:07:11 +0200
committerMartin Kagamino Lehoux <martin@lehoux.net>2026-08-27 12:07:11 +0200
commit522512197de372aa9b9c5584711619a76a5546d8 (patch)
tree2f005e279adc1f7da1afe7155d5b87c80c8c4840 /geo/interval.go
parent1c5fc2e4364063884f33b78f45f351201705fae4 (diff)
clenaup
Diffstat (limited to 'geo/interval.go')
-rw-r--r--geo/interval.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/geo/interval.go b/geo/interval.go
new file mode 100644
index 0000000..33985d0
--- /dev/null
+++ b/geo/interval.go
@@ -0,0 +1,15 @@
+package geo
+
+// Interval is an inclusive index range [Start, End] over position data, used
+// to refer to a stretch of a route by point indexes.
+type Interval struct {
+ Start, End int
+}
+
+// NewInterval returns an Interval with the given start and end indexes.
+func NewInterval(start, end int) Interval {
+ return Interval{
+ Start: start,
+ End: end,
+ }
+}