Day 17 solution

My initial idea for a solution ended up working out great, but I had a hard time getting it all down on "paper," so to speak, so this is probably 200 lines of code too many, but it definitely does exactly what I envisioned (and quickly) even if it's not the most succinct.
This commit is contained in:
2022-07-11 09:31:26 -05:00
parent ec27a5ec6c
commit 1f27585231
4 changed files with 426 additions and 0 deletions

View File

@ -13,6 +13,8 @@ type Vec3[T Number] struct {
Z T
}
type Vec2i Vec2[int]
func (v Vec2[T]) Dot(other Vec2[T]) T {
return (v.X * other.X) + (v.Y * other.Y)
}