The dot and cross products are implemented at the lowest level in UnitVector, and the Vector class simply calls these methods on all of the UnitVector objects that comprise it when these methods are called on a Vector class.
dot and cross functions are provided as convenience wrapper functions around the class methods, so the user can choose to use whichever approach is more natural to them. ~Luke On Tue, May 10, 2011 at 11:02 AM, Vinzent Steinberg <vinzent.steinb...@googlemail.com> wrote: > On 10 Mai, 03:30, Ronan Lamy <ronan.l...@gmail.com> wrote: >> Please, try to make the interface dot(v1, v2), and not v1.dot(v2). > > While I agree that it looks cleaner for the simple case, I would > prefer > > v1.dot(v2).dot(v3) > > over > > dot(dot(v1, v2), v3) > > For the dot product it does of course not make sense to multiply three > vectors in a row, but I think we should keep this in mind in general > for user defined operations. > > Vinzent > > -- > You received this message because you are subscribed to the Google Groups > "sympy" group. > To post to this group, send email to sympy@googlegroups.com. > To unsubscribe from this group, send email to > sympy+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/sympy?hl=en. > > -- "Those who would give up essential liberty to purchase a little temporary safety deserve neither liberty nor safety." -- Benjamin Franklin, Historical Review of Pennsylvania, 1759 -- You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to sympy@googlegroups.com. To unsubscribe from this group, send email to sympy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.