From: Jonathan B. <jbr...@ea...> - 2004-05-16 20:21:05
|
On Sat, 2004-05-15 at 23:37, Andrew Williams wrote: > On Sat, 15 May 2004 21:36:07 -0400, Bruce Sherwood wrote: > > >I don't understand this syntax. If pos2 and pos1 are intended to stand > >for something like box1.pos and box2.pos, positions of VPython objects, > >then what you need is mag(pos2-pos1), not abs(pos2-pos1). > > > >> On Fri, 2004-05-14 at 09:28, Andrew Williams wrote: > >>> > >>>if abs(pos2 - pos1) < 0.01: > >>> handle_collision() > > The 'abs' builtin does return the magnitude of a vector - I checked > before posting the email. This is undocumented behavior and should not be relied upon in the future. -Jonathan Brandmeyer |