[Bf-python] AngleBetweenVecs still buggy.

Stephen Swaney sswaney at centurytel.net
Tue Sep 27 01:31:23 CEST 2005


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

Yah Joseph!

> 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.

-- 
Stephen Swaney			
sswaney at centurytel.net




More information about the Bf-python mailing list