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 9b61208..4cbe9ad 100644
--- a/Lib/random.py
+++ b/Lib/random.py
@@ -449,9 +449,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