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

Gilbert, Joseph jgilbert at tigr.ORG
Mon Oct 10 22:07:41 CEST 2005


Yep. I remember we went with saacos before and it gave bad precision
(which was a previous bug fix) because of what theeth is saying - python
floats are really doubles. I'm just going to add a test so values are
not always clamped. :)

-----Original Message-----
From: bf-committers-bounces at projects.blender.org
[mailto:bf-committers-bounces at projects.blender.org] On Behalf Of Martin
Poirier
Sent: Monday, October 10, 2005 3:51 PM
To: bf-blender developers
Subject: Re: [Bf-committers] Re: Re: [Bf-blender-cvs] CVS
commit:blender/source/blender/python/api2_2x Mathutils.c


--- Brecht Van Lommel <brechtvanlommel at pandora.be>
wrote:

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

The "problem" is that saacos returns a single
precision float whereass python uses double precision
floats, so using acos directly has added precision
(even though the vector's data is in single
precision).

Martin


		
__________________________________ 
Start your day with Yahoo! - Make it your home page! 
http://www.yahoo.com/r/hs
_______________________________________________
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