Skip to content

Commit 18c9417

Browse files
committed
Update readme
1 parent 6de5048 commit 18c9417

File tree

1 file changed

+16
-14
lines changed

1 file changed

+16
-14
lines changed

README.md

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# vector
22

3-
[![Version](https://img.shields.io/github/release/kvartborg/vector.svg)](https://github.com/kvartborg/vector/releases)
4-
[![GoDoc](https://godoc.org/github.com/kvartborg/vector?status.svg)](https://pkg.go.dev/github.com/kvartborg/vector?tab=doc)
5-
[![Go Report Card](https://goreportcard.com/badge/github.com/kvartborg/vector)](https://goreportcard.com/report/github.com/kvartborg/vector)
3+
[![Version](https://img.shields.io/github/release/quartercastle/vector.svg)](https://github.com/quartercastle/vector/releases)
4+
[![GoDoc](https://godoc.org/github.com/quartercastle/vector?status.svg)](https://pkg.go.dev/github.com/quartercastle/vector?tab=doc)
5+
[![Go Report Card](https://goreportcard.com/badge/github.com/quartercastle/vector)](https://goreportcard.com/report/github.com/quartercastle/vector)
66

77
The motivation behind this package is to find a better way to write vector math
88
in Golang, there has to be a more expressive way without it getting to verbose.
@@ -12,20 +12,22 @@ well. You should properly take a look at [`gonum`](https://github.com/gonum/gonu
1212

1313
## Install
1414
```sh
15-
go get github.com/kvartborg/vector
15+
go get github.com/quartercastle/vector
1616
```
1717

1818
## Usage
19-
Golang does not have a way to define generic types yet, which
20-
limits this package to operate with vectors represented as `float64` values only.
21-
To allow for multi-dimensional vectors, a vector is simply represented as
22-
a list of `float64` values.
2319
```go
24-
// A Vector is simply a list of float64 values
25-
type Vector []float64
20+
package main
21+
22+
import "github.com/quartercastle/vector"
23+
24+
type vec = vector.Vector
25+
26+
func main() {
27+
a, b := vec{1, 2}, vec{3, 4}
28+
c := a.Add(b)
29+
}
2630
```
27-
> I will consider adding `float32` and `int` support at a later stage,
28-
if there is a good reason or when go adds generics to the language.
2931

3032
### Tackling verbosity
3133
Another goal of this experiment is to minimize the verbosity around using the package,
@@ -73,7 +75,7 @@ v2 := v1[1:] // returns a new vec{2, 3}
7375
```
7476

7577
## Documentation
76-
The full documentation of the package can be found on [godoc](https://pkg.go.dev/github.com/kvartborg/vector?tab=doc).
78+
The full documentation of the package can be found on [godoc](https://pkg.go.dev/github.com/quartercastle/vector?tab=doc).
7779

7880
## Contributions
7981
Contributions with common vector operations that are not included in this package are welcome.
@@ -82,4 +84,4 @@ Contributions with common vector operations that are not included in this packag
8284
Thanks to [`gonum`](https://github.com/gonum/gonum) for inspiration and the following functions [`axpyUnitaryTo`](https://github.com/gonum/gonum/blob/master/internal/asm/f64/axpyunitaryto_amd64.s), [`scalUnitaryTo`](https://github.com/gonum/gonum/blob/c3867503e73e5c3fee7ab93e3c2c562eb2be8178/internal/asm/f64/scalunitaryto_amd64.s) that enhances the performance of arithmetic operations in this package.
8385

8486
## License
85-
This project is licensed under the [MIT License](https://github.com/kvartborg/vector/blob/master/LICENSE) and includes [`gonum`](https://github.com/gonum/gonum) code that is licensed under [3-Clause BSD license](https://github.com/gonum/gonum/blob/master/LICENSE).
87+
This project is licensed under the [MIT License](https://github.com/quartercastle/vector/blob/master/LICENSE) and includes [`gonum`](https://github.com/gonum/gonum) code that is licensed under [3-Clause BSD license](https://github.com/gonum/gonum/blob/master/LICENSE).

0 commit comments

Comments
 (0)