From c679680cf03e0c997e73a6ade749450b649cc122 Mon Sep 17 00:00:00 2001 From: Alexander Nozik Date: Sat, 8 Oct 2022 14:16:12 +0300 Subject: [PATCH] Fix curve reverse --- .../kotlin/center/sciprog/maps/coordinates/GmcCurve.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/maps-kt-core/src/commonMain/kotlin/center/sciprog/maps/coordinates/GmcCurve.kt b/maps-kt-core/src/commonMain/kotlin/center/sciprog/maps/coordinates/GmcCurve.kt index e09281f..dbe9eb5 100644 --- a/maps-kt-core/src/commonMain/kotlin/center/sciprog/maps/coordinates/GmcCurve.kt +++ b/maps-kt-core/src/commonMain/kotlin/center/sciprog/maps/coordinates/GmcCurve.kt @@ -20,7 +20,10 @@ public class GmcCurve( } } -public fun GmcCurve.reversed(): GmcCurve = GmcCurve(backward, forward, distance) +/** + * Reverse direction and order of ends + */ +public fun GmcCurve.reversed(): GmcCurve = GmcCurve(backward.reversed(), forward.reversed(), distance) /** * Compute a curve alongside a meridian