Initial commit

This commit is contained in:
2022-06-05 12:54:30 -04:00
commit cb1bdec005
21 changed files with 702 additions and 0 deletions

19
core/vector2.go Normal file
View File

@ -0,0 +1,19 @@
package core
import "fmt"
type Vector2 struct {
X float64
Y float64
}
func (p Vector2) String() string {
return fmt.Sprintf("X: %v, Y: %v", p.X, p.Y)
}
func (vector Vector2) Add(other Vector2) Vector2 {
return Vector2{
X: vector.X + other.X,
Y: vector.Y + other.Y,
}
}