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:
@ -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)
|
||||
}
|
||||
|
Reference in New Issue
Block a user