Removed unneeded parentheses

This commit is contained in:
Sergio Vera Castellano 2018-01-12 12:52:50 +01:00
parent 95a0f895b2
commit 47b78a7c85
1 changed files with 4 additions and 4 deletions

View File

@ -40,13 +40,13 @@ func NewScrollingBackground(pic pixel.Picture, width, height, speed float64) *Sc
func (sb *ScrollingBackground) positionImages() { func (sb *ScrollingBackground) positionImages() {
if sb.speed > 0 { if sb.speed > 0 {
sb.positions = [2]pixel.Vec{ sb.positions = [2]pixel.Vec{
pixel.V(sb.width/2, (sb.height / 2)), pixel.V(sb.width/2, sb.height/2),
pixel.V((sb.width/2)-sb.width, (sb.height / 2)), pixel.V((sb.width/2)-sb.width, sb.height/2),
} }
} else { } else {
sb.positions = [2]pixel.Vec{ sb.positions = [2]pixel.Vec{
pixel.V(sb.width/2, (sb.height / 2)), pixel.V(sb.width/2, sb.height/2),
pixel.V(sb.width+(sb.width/2), (sb.height / 2)), pixel.V(sb.width+(sb.width/2), sb.height/2),
} }
} }
} }