Issue #17149: Fix random.vonmisesvariate to always return results in [0, 2*math.pi].
diff --git a/Lib/random.py b/Lib/random.py
index 36b9565..bfa710b 100644
--- a/Lib/random.py
+++ b/Lib/random.py
@@ -475,9 +475,9 @@
 
         u3 = random()
         if u3 > 0.5:
-            theta = (mu % TWOPI) + _acos(f)
+            theta = (mu + _acos(f)) % TWOPI
         else:
-            theta = (mu % TWOPI) - _acos(f)
+            theta = (mu - _acos(f)) % TWOPI
 
         return theta