Skip to content

Commit

Permalink
Fix documentation on getRandomValueFromInterval
Browse files Browse the repository at this point in the history
  • Loading branch information
niondir authored and cenkalti committed Feb 18, 2020
1 parent a9a4cec commit e13aad9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion exponential.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ func (b *ExponentialBackOff) incrementCurrentInterval() {
}

// Returns a random value from the following interval:
// [randomizationFactor * currentInterval, randomizationFactor * currentInterval].
// [currentInterval - randomizationFactor * currentInterval, currentInterval + randomizationFactor * currentInterval].
func getRandomValueFromInterval(randomizationFactor, random float64, currentInterval time.Duration) time.Duration {
var delta = randomizationFactor * float64(currentInterval)
var minInterval = float64(currentInterval) - delta
Expand Down

0 comments on commit e13aad9

Please sign in to comment.