2D vector math: add feature
2D vector math: add feature: a task in smol-software-harbor (Harbor dataset). Comparing two vectors with == in src/vec.lua compares table identity, so V.new(1, 2) == V.new(1, 2) is false. Add an eq metamethod so vectors with the same components are equal (and different ones are not), and a…
The task
Comparing two vectors with `==` in `src/vec.lua` compares table identity, so `V.new(1, 2) == V.new(1, 2)` is false. Add an `__eq` metamethod so vectors with the same components are equal (and different ones are not), and a `V.dot(a, b)` function returning the dot product. Run `lua tests/run.lua`.
Part of efederici/smol-software-harbor.