From a612240e5058d5ed7faabf913f519c90491c5d49 Mon Sep 17 00:00:00 2001 From: haskal Date: Sat, 12 Dec 2020 00:26:27 -0500 Subject: [PATCH] day 12: fix minor issue --- 12.rkt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/12.rkt b/12.rkt index 44482b3..dbff465 100644 --- a/12.rkt +++ b/12.rkt @@ -21,7 +21,7 @@ ["L" (values (+ dir (d->r num)) x y)] ["R" (values (- dir (d->r num)) x y)] ["F" (values dir (+ x (* num (cos dir))) (+ y (* num (sin dir))))]))) - (inexact->exact (floor (abs (+ x y))))) + (inexact->exact (floor (+ (abs x) (abs y))))) (define (part2 input) (define (rot x y d) @@ -44,7 +44,7 @@ (values sx sy nwx nwy)] ["F" (values (+ sx (* num wx)) (+ sy (* num wy)) wx wy)]))) - (inexact->exact (floor (abs (+ (abs sx) (abs sy)))))) + (inexact->exact (floor (+ (abs sx) (abs sy))))) (module+ test (require rackunit)