summaryrefslogtreecommitdiff
path: root/Lib/random.py
diff options
context:
space:
mode:
authorMark Dickinson <dickinsm@gmail.com>2013-02-10 14:16:56 +0000
committerMark Dickinson <dickinsm@gmail.com>2013-02-10 14:16:56 +0000
commit6427358501ac5b5a33b1c0543b46f6d378cea7e3 (patch)
treec9f09918209cea1c7331ca9d2b24c000875f16e0 /Lib/random.py
parentbf95c143a29aa73eed91b630849432f1ff43d602 (diff)
parentbe5f91957f3d553a7cbbfdc43f66a3b30bb97aec (diff)
downloadcpython-git-6427358501ac5b5a33b1c0543b46f6d378cea7e3.tar.gz
Issue #17149: merge fix from 3.2.
Diffstat (limited to 'Lib/random.py')
-rw-r--r--Lib/random.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/random.py b/Lib/random.py
index 6388f299d3..c2750719ac 100644
--- a/Lib/random.py
+++ b/Lib/random.py
@@ -449,9 +449,9 @@ class Random(_random.Random):
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