A Vector library for 2D applications. Forked from deeean/go-vector, with the main change being that the vector parameters aren't pointers, and the struct is generically typed.
go get -u github.com/Lundis/go-vector/vector2
package main
import (
"fmt"
"github.com/Lundis/go-vector/vector2"
)
func main() {
// basic usage
a := vector2.NewFloat64(1, 2)
b := vector2.NewFloat32(3, 4)
fmt.Println(vector2.Add(a, b))
}