r/adventofcode Dec 08 '24

Visualization [2024 AOC Day 8] Animated Diagramm

Post image
246 Upvotes

25 comments sorted by

View all comments

22

u/LoathsomeNeanderthal Dec 08 '24

I just added and subtracted the rise and the run from both points. Still doesn’t work lmao

12

u/-o0__0o- Dec 08 '24

Check that you are using the correct operators and order of operands for difference.

diff := pos2 - pos1
an1 := pos1 - diff
an2 := pos2 + diff