[Bf-python] AngleBetweenVecs still buggy.

Martin Poirier theeth at yahoo.com
Tue Sep 27 04:07:37 CEST 2005



--- Stephen Swaney <sswaney at centurytel.net> wrote:

> On Tue, Sep 27, 2005 at 09:17:37AM +1000, Campbell
> Barton wrote:
> > Hi Joseph, thanks for committing Theeths patch,
> 
> Yah Joseph!

Yay!

> > From recent testing AngleBetweenVecs only returns
> NAN when given a zero 
> > length vector.
> > Useually Id say that it could raise an exception,
> but faces with a very 
> > small area can return there normal as (0,0,0) - so
> maybe it would be 
> > good to check if either vector is 0,0,0 and return
> 0 as the result. - 
> 
> It seems to me:
> A zero length vector does not point in any
> particular direction.
> To say the angle is zero is misleading at best.
> 
> Better to throw the exception, I think.
> ArithmeticError, or FloatingPointError maybe.

I'll add some weight to that, giving back 0.0 would
not only be misleading but transfer the task of
boundary checking to the caller which is grossly
inapropriate.

Martin

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



More information about the Bf-python mailing list