From 4b1f2ee9238bd561ab3d67ef2095078901dbf2c1 Mon Sep 17 00:00:00 2001 From: Daniel Barlow Date: Sun, 22 Jan 2023 21:39:56 +0000 Subject: [PATCH] add test for southern hemisphere --- rover.fnl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rover.fnl b/rover.fnl index eac964e..14ccabd 100644 --- a/rover.fnl +++ b/rover.fnl @@ -141,6 +141,10 @@ (execute (rover 0 45 :e) [:f]) (where {:x x } (< (math.abs (- x 1.4141)) 0.001))) +(expect "At 45 degrees latitude south, one unit of drive is (sqrt 2) degrees" + (execute (rover 0 -45 :e) [:f]) + (where {:x x :y -45} (< (math.abs (- x 1.4141)) 0.001))) + ;; valid longitudes are -180 .. 180 (expect "Longitude wraps from positive to negative when travelling west"