It says in the documentation: If angle2 is greater than angle1 it will be progressively decreased by 2*M_PI until it is greater than angle1. The second "greater than" should be "less than".
Created attachment 9407 [details] [review] patch changing this
Thanks. Fixed in c2b1908f9b0d8c59abf79c3462471d1c3960b153
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.