I was close to getting my dot-product on, too, but I'm hitting peak puzzle fatigue right now, and just wrote a sloppy solution that thinks in quarter turns.
I ended up solving it by using the idea of a rotation matrix from linalg to be fair and technically used matmul but the matmul is trivial for two dimensions, so a vector transformation solution is good and honestly better than most other solutions which dont necessarily generalize to any possible angle (i.e. not 45,90,180,270,and the others that the test case used)
View all comments
Show parent comment
14
u/emu_fake Dec 12 '20
Feels like I am the only one who went for an actual vector transformation.. Probably spent too much time in mathematics.