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

Brecht Van Lommel brechtvanlommel at pandora.be
Mon Oct 10 21:41:48 CEST 2005

Exactly. There is a saacos ('safe acos') function in BLI_arithb.h just for this,
and it's used all over the sources. acos should never be called directly.


Arne Schmitz wrote:
> Am Montag, 10. Oktober 2005 21:14 schrieb GSR:
>>Should not the result already be between that, and if not, then
>>something is really wrong? In other words, not clamp but return error.
> No, after a dot product, the value will sometimes slightly fall out of the 
> [-1, 1] range, due to rounding errors. For performance reasons, you wouldn't 
> want to clamp the values ALL the time, but only e.g. if you compute the acos 
> of a value. The acos is of course *only* defined over [-1, 1].
> Arne
> ------------------------------------------------------------------------
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at projects.blender.org
> http://projects.blender.org/mailman/listinfo/bf-committers

More information about the Bf-committers mailing list