On Mon, Feb 11, 2013 at 6:32 PM, Robert Osfield <[email protected]>wrote:

> Hi Guys,
>
> On 11 February 2013 13:24, Jordi Torres <[email protected]> wrote:
> > I can confirm that Jan's solution actually works for android.
>
> If you have a stable version of include/osg/Math that works on Android
> could you post it to osg-submission so I can review it.
>

Robert, I have done only the following hack (replace std::isnan() with
isnan()) to be able to quickly compile as I have demo deadline coming. I
didn't do any more extensive testing (OSG for Android takes a long time to
build on Windows), but the OSG works like this.

#if defined(_MSC_VER)
    inline bool isNaN(double v) { return _isnan(v)!=0; }
#else
    inline bool isNaN(float v) { return isnan(v); }
    inline bool isNaN(double v) { return isnan(v); }
#endif

That is obviously not ideal (it basically reverts what you did for every
platform but MSVC/Windows) , but I don't know what is the canonical way to
test for Android. Furthermore, similar problem may occur on gcc platforms
as well - the std::isnan() is only present in the latest C++ standard, the
above relies on the isnan() being "grandfathered" from the C99 gcc headers.

Regards,

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

Reply via email to