From bc151b475c84fa74cb23b4cc5493e464e9d0acf0 Mon Sep 17 00:00:00 2001 From: adehad <26027314+adehad@users.noreply.github.com> Date: Tue, 21 May 2019 15:26:00 +0100 Subject: [PATCH] Added -pi shift for [-pi,pi] range https://github.com/circstat/circstat-matlab/issues/7 --- circ_vmrnd.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/circ_vmrnd.m b/circ_vmrnd.m index a948657..00285bc 100644 --- a/circ_vmrnd.m +++ b/circ_vmrnd.m @@ -47,7 +47,7 @@ % if kappa is small, treat as uniform distribution if kappa < 1e-6 - alpha = 2*pi*rand(n,1); + alpha = 2*pi*rand(n,1)-pi; return end