Hi, Robert.

As a result of the discussion in the osg-users list
(post: "Please test SVN version of OpenSceneGraph") I
created a new patch for the Math functions, which
should solve the problem of integer binary logarithm.

So here again a summarize of the patch:

-----------------------
Features:
- new functions log2 for types: float, double, int and
unsigned int were added to the Math header
- integer log2 do compute the binary logarithm of an
(unsigned) integer number
- returns -1 on errors or a floored logarithm back
(e.g log2(15) = 3, log2(16) = 4, log2(31) = 4)

Testings:
- made an explicit speed test. On my System (AMD
Opteron 2218) the integer version is faster than the
double version.
- made error test against double version of the log2:
no errors were found.


ToDo:
- nothing
-----------------------

The file is attached. It is the same as I posted in
the osg-users list. But since this is the right list
to post the patches, I do post it again here.

I think the patch should fix the build problems on an
MS compilers, which do not include a log2 function
into their math.h headers.

Best regards, Art





      ________ 
Yahoo! Clever: Stellen Sie Fragen und finden Sie Antworten. Teilen Sie Ihr 
Wissen. www.yahoo.de/clever

Attachment: Math
Description: 2923311751-Math

_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to