Skip to content

Commit

Permalink
Major change in gate update function.
Browse files Browse the repository at this point in the history
  • Loading branch information
rlj1202 committed May 7, 2018
1 parent 942b002 commit 1e1c641
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gate.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func (g *gate) updateState(newState bool) {
return
}

g.slowState += TIME_RAISE * rand.Float32()
g.slowState += TIME_RAISE + TIME_RANDOM*rand.Float32()

if g.slowState >= 1 {
g.slowState = 1
Expand All @@ -44,7 +44,7 @@ func (g *gate) updateState(newState bool) {
return
}

g.slowState -= TIME_FALL * rand.Float32()
g.slowState -= TIME_FALL + TIME_RANDOM*rand.Float32()

if g.slowState <= 0 {
g.slowState = 0
Expand Down

0 comments on commit 1e1c641

Please sign in to comment.