[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [pygame] How to rotate a rect

Michael Robin wrote:

> Of course, I'm sure you all know all this basic crap already - but I thought
> better to correct my own screw-up.
> (And now I see that given that you named the variable "distsquared" and you
> squard limitsize, it was probably just a typo in the first place to omit the
> **2, so Manhattan nor any other bourough of NYC was ever intended... Arg.)

Argh, the **2 was in my reference code, but for some reason I was
thinking the distance formula was sqrt(a + b) when it is of course
sqrt(a**2 + b**2).  So I figured I'd got the formula wrong in the code
and "fixed" it in my post.  I guess that's why I switched majors from
math to computer science.  :-)

Paul Sidorsky                                          Calgary, Canada
paulsid@home.com                      http://members.home.net/paulsid/
pygame mailing list