https://github.com/petrkotek/go-vector
Go (golang) library implementing vector math.
https://github.com/petrkotek/go-vector
golang vector vector-math
Last synced: 10 months ago
JSON representation
Go (golang) library implementing vector math.
- Host: GitHub
- URL: https://github.com/petrkotek/go-vector
- Owner: petrkotek
- License: apache-2.0
- Created: 2016-04-19T16:33:53.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-04-19T17:55:40.000Z (almost 10 years ago)
- Last Synced: 2025-04-19T23:52:33.218Z (10 months ago)
- Topics: golang, vector, vector-math
- Language: Go
- Size: 6.84 KB
- Stars: 3
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://travis-ci.org/petrkotek/go-vector)
[](https://coveralls.io/github/petrkotek/go-vector?branch=master)
# go-vector
Go (golang) library implementing vector math.
## Usage
### 1. Fetch the package
```
go get github.com/petrkotek/go-vector
```
### 2. Import the package
Import the package into your `.go` file:
```go
package main
import (
"fmt"
"github.com/petrkotek/go-vector/2d/32bit/vec"
)
func main() {
v1 := vec.New(1, 2)
v2 := vec.New(3, 4)
fmt.Println(v1.Add(v2))
}
```