Skip to content

Commit

Permalink
Fix #2
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergey Egorov committed May 20, 2019
1 parent 8d29fd5 commit 1f317b5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion norm.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ func (n Norm) Jitter(d time.Duration) time.Duration {
}

samp := f()*float64(n.Stdev) + float64(n.Mean)
return d * time.Duration(samp)
return d + time.Duration(samp)
}
2 changes: 1 addition & 1 deletion univariate.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ type Univariate struct {

// Jitter the duration by drawing from a univariate distribution
func (u Univariate) Jitter(d time.Duration) time.Duration {
return d * time.Duration(u.Rand())
return d + time.Duration(u.Rand())
}

0 comments on commit 1f317b5

Please sign in to comment.