On Jan 26, 1:32 am, Jeroen Ruigrok van der Werven <[EMAIL PROTECTED]
nomine.org> wrote:
> -On [20080126 06:26], Tim Rau ([EMAIL PROTECTED]) wrote:
>
> >Line 147 reads:
> >        moi = cp.cpMomentForCircle(self.mass, .2, 0, vec2d((0,0)))
>
> I think it expects something like:
>
> # badly named variable, pick something better depending on context
> temp = vec2d(0, 0)
> cp.cpMomentForCircle(self.mass, .2, 0, temp)
>
> I am curious about your use of double braces for vec2d though. Why ((0,0)) and
> not (0, 0)?

the double parens are a tuple being passed as an argument. vec2d is
not a constructor that cares whether it gets a tuple or a pair of
ints. I choose tuple for consistency with the rest of my code.  Isn't
what it gets the value returned by the constructor, no matter whether
you assign it to an intermediate value first? I tried it, and the
result is the same.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to