Author serhiy.storchaka
Recipients mark.dickinson, rhettinger, serhiy.storchaka
Date 2013-02-08.11:37:12
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Sorry, I was wrong. I missed that z is in range -1..1. Original report is invalid, random.vonmisesvariate() always returns a value on the full circle.

However there is some inconsistency. For small kappa (<= 1e-6) result range is 0 to 2pi, for other kappa it is (mu%2pi)-pi to (mu%2pi)+pi. For consistency we should either shift a range for small kappa:

        if kappa <= 1e-6:
            return (mu % TWOPI) - _pi + TWOPI * random()

or normalize a result in another case:

        if u3 > 0.5:
            theta = (mu + _acos(f)) % TWOPI
            theta = (mu - _acos(f)) % TWOPI
Date User Action Args
2013-02-08 11:37:12serhiy.storchakasetrecipients: + serhiy.storchaka, rhettinger, mark.dickinson
2013-02-08 11:37:12serhiy.storchakasetmessageid: <>
2013-02-08 11:37:12serhiy.storchakalinkissue17149 messages
2013-02-08 11:37:12serhiy.storchakacreate