diff options
author | Arun Isaac | 2023-10-07 20:45:08 +0100 |
---|---|---|
committer | Arun Isaac | 2023-10-07 20:45:08 +0100 |
commit | 35e35f233b5dcf7669361df5ebb8e33f799ae52d (patch) | |
tree | 3abf0685a34c428888b5a37a062abcc459cddb4c | |
parent | d97998201a16e1eda23f9f0654561e8a659a8f38 (diff) | |
download | rent-in-london-35e35f233b5dcf7669361df5ebb8e33f799ae52d.tar.gz rent-in-london-35e35f233b5dcf7669361df5ebb8e33f799ae52d.tar.lz rent-in-london-35e35f233b5dcf7669361df5ebb8e33f799ae52d.zip |
Never use exponential notation for latitudes and longitudes.
* rent.scm (cycling-distance): Use ~f instead of ~a while formatting
latitudes and longitudes.
-rw-r--r-- | rent.scm | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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))) |