[Bf-committers] Re: Re: [Bf-blender-cvs] CVS commit: blender/source/blender/python/api2_2x Mathutils.c

GSR gsr.b3d at infernal-iceberg.com
Mon Oct 10 21:14:26 CEST 2005


Hi,
jgilbert at tigr.ORG (2005-10-10 at 1429.07 -0400):
> Good catch. Bug squashed.
>
> -----Original Message-----
> From: bf-committers-bounces at projects.blender.org
> [mailto:bf-committers-bounces at projects.blender.org] On Behalf Of Ken
> Hughes
> Sent: Monday, October 10, 2005 12:08 PM
> To: bf-committers at blender.org
> Subject: Re: [Bf-blender-cvs] CVS commit:
> blender/source/blender/python/api2_2x Mathutils.c
> 
> Joseph Gilbert wrote:
> > ascotan (Joseph Gilbert) 2005/10/10 17:29:00 CEST
> > 
> >   Modified files:
> >     blender/source/blender/python/api2_2x Mathutils.c 
> 
> Shouldn't the dot product be clamped (-1.0,1.0)?

Should not the result already be between that, and if not, then
something is really wrong? In other words, not clamp but return error.

Given A and B vectors of N components:

                              A1*B1 + ... + An*Bn
angle = acos -----------------------------------------------------
             sqrt(A1*A1 + ... + An*An) * sqrt(B1*B1 + ... + Bn*Bn)

And if it is due rounding problems in computers, then that fuction
does if(!test_v1 || !test_v2) and I always see such kind of testing
being done with an epsilon.

GSR
 


More information about the Bf-committers mailing list