Upgraded gopoints => v1.0.4

master
0x1a8510f2 2 years ago
parent 83648f3417
commit f200ce797d
Signed by: 0x1a8510f2
GPG Key ID: F5DE8E33A2723FF6
  1. 2
      go.mod
  2. 2
      go.sum
  3. 2
      vendor/github.com/TR-SLimey/gopoints/constants.go
  4. 3
      vendor/github.com/TR-SLimey/gopoints/plane.go
  5. 2
      vendor/modules.txt

@ -3,6 +3,6 @@ module li.an-atom-in.space/trslimey/GoPhysicsLab
go 1.15
require (
github.com/TR-SLimey/gopoints v1.0.3
github.com/TR-SLimey/gopoints v1.0.4
github.com/pkg/browser v0.0.0-20201207095918-0426ae3fba23
)

@ -1,4 +1,6 @@
github.com/TR-SLimey/gopoints v1.0.3 h1:UGJv+nnSq4kTedc3BBYrqH4OuXIvTqe0/oq6/igqP7U=
github.com/TR-SLimey/gopoints v1.0.3/go.mod h1:19gVo7HWeybl8izsBJ7TA0G3P4NBIFmj+ZVaEGfjj8k=
github.com/TR-SLimey/gopoints v1.0.4 h1:0lY5a4Qsn/Y3sn4vNo9n2UQogf8qUp3VwC26HTlGWTY=
github.com/TR-SLimey/gopoints v1.0.4/go.mod h1:19gVo7HWeybl8izsBJ7TA0G3P4NBIFmj+ZVaEGfjj8k=
github.com/pkg/browser v0.0.0-20201207095918-0426ae3fba23 h1:dofHuld+js7eKSemxqTVIo8yRlpRw+H1SdpzZxWruBc=
github.com/pkg/browser v0.0.0-20201207095918-0426ae3fba23/go.mod h1:N6UoU20jOqggOuDwUaBQpluzLNDqif3kq9z2wpdYEfQ=

@ -1,4 +1,4 @@
package gopoints
// Current gopoints version
const VERSION string = "v1.0.3"
const VERSION string = "v1.0.4"

@ -274,12 +274,13 @@ func (pln *Plane) Flip(dimension int) {
// It also returns the flipped points as a slice.
func (pln *Plane) FlipPoints(points []Point, dimension int) []Point {
dimensionMax := pln.dimensions[dimension]
for _, point := range points {
for i, point := range points {
if dimension == 0 {
point.X = dimensionMax - point.X
} else if dimension == 1 {
point.Y = dimensionMax - point.Y
}
points[i] = point
}
return points
}

@ -1,4 +1,4 @@
# github.com/TR-SLimey/gopoints v1.0.3
# github.com/TR-SLimey/gopoints v1.0.4
## explicit
github.com/TR-SLimey/gopoints
# github.com/pkg/browser v0.0.0-20201207095918-0426ae3fba23

Loading…
Cancel
Save