projects
/
advent-of-code-22.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
75c6834
)
Minor tidy
author
Neil Smith
<NeilNjae@users.noreply.github.com>
Mon, 12 Dec 2022 11:48:04 +0000
(13:48 +0200)
committer
Neil Smith
<NeilNjae@users.noreply.github.com>
Mon, 12 Dec 2022 11:48:04 +0000
(13:48 +0200)
advent09/Main.hs
patch
|
blob
|
history
diff --git
a/advent09/Main.hs
b/advent09/Main.hs
index 1314035a7f53cf49c01f5614f3cd1e09e448965e..0ad2bb5e2eecfe98e7e8fc3c59d28dd8cadc8a8d 100644
(file)
--- a/
advent09/Main.hs
+++ b/
advent09/Main.hs
@@
-53,7
+53,7
@@
manhattan p1 p2 = max dx dy
where V2 dx dy = abs $ p1 ^-^ p2
touching :: Position -> Position -> Bool
-touching p1 p2 =
(manhattan p1 p2) <= 1
+touching p1 p2 = (manhattan p1 p2) <= 1
towards :: Position -> Position -> Position
towards p1 p2 = signum $ p2 ^-^ p1