From 1f317b556e8b6534a738d717bd9e02e411ed4414 Mon Sep 17 00:00:00 2001 From: Sergey Egorov Date: Mon, 20 May 2019 11:36:31 +0300 Subject: [PATCH] Fix #2 --- norm.go | 2 +- univariate.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/norm.go b/norm.go index 3371922..7ba6ad7 100644 --- a/norm.go +++ b/norm.go @@ -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) } diff --git a/univariate.go b/univariate.go index ea1ffa4..dc7fdcf 100644 --- a/univariate.go +++ b/univariate.go @@ -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()) }