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-06-14 14:37:06 -05:00
parent c788813cd2
commit 5bc089c83d
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)
}