From 35e35f233b5dcf7669361df5ebb8e33f799ae52d Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Sat, 7 Oct 2023 20:45:08 +0100 Subject: Never use exponential notation for latitudes and longitudes. * rent.scm (cycling-distance): Use ~f instead of ~a while formatting latitudes and longitudes. --- rent.scm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rent.scm b/rent.scm index 1effb3e..7ae101d 100644 --- a/rent.scm +++ b/rent.scm @@ -352,7 +352,11 @@ and not distance as the crow flies." #(point-b-latitude point-b-longitude)) (call-with-port (open-bytevector-input-port (http-get* - (format #f "~a/table/v1/bike/~a,~a;~a,~a?annotations=distance&sources=0&destinations=1" + ;; We use ~f for latitude/longitude since ~a + ;; would use the exponential float notation for + ;; small numbers and the API does not like + ;; that. + (format #f "~a/table/v1/bike/~f,~f;~f,~f?annotations=distance&sources=0&destinations=1" %osrm-base-url point-a-longitude point-a-latitude point-b-longitude point-b-latitude))) -- cgit v1.2.3