Hi,

as mentioned in ticket #20 (https://opensg.vrsource.org/trac/ticket/20)
I have found a different implementation for osgispower2 and
osgnextpower2 (from OSGBaseFunctions.h).
Now, currently there is code like this:

in OSGBaseFunctions.h

template <class TypeT> inline
bool osgispower2(TypeT rValue);

and in OSGBaseFunctions.inl

template <> inline
bool osgispower2<UInt32>(UInt32 rValue)
{
        // code
}

template <> inline
bool osgispower2<Int32>(Int32 rValue)
{
        // code
}

The current code for the Int32 case (correctly) returns false for
negative input and (incorrectly) true for 0. Now the question is what is
the most useful behavior here ? Keep as is, just fix the handling of 0,
return true for numbers of the form -(2^n) as well ?

        Thanks,
                Carsten

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Opensg-core mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-core

Reply via email to