Guest xionmark Posted November 30, 2012 Share Posted November 30, 2012 (edited) Hello, I'm getting NAN complaints from mantra even though I'm clamping the values in question to the standard C++ numeric limits. Is there a different limit I should be using in the HDK? The message from mantra: mantra: Geometry undefined contains NANs This is how I'm trying to clamp the velocity being passed to mantra, seems fine to me: SYSclamp(v[0], std::numeric_limits<float>::min(), std::numeric_limits<float>::max()); SYSclamp(v[1], std::numeric_limits<float>::min(), std::numeric_limits<float>::max()); SYSclamp(v[2], std::numeric_limits<float>::min(), std::numeric_limits<float>::max()); Many thanks! Edited December 3, 2012 by xionmark Quote Link to comment Share on other sites More sharing options...
edward Posted December 3, 2012 Share Posted December 3, 2012 How do you know it's the velocity? Perhaps it's somewhere else in the geometry like P? Quote Link to comment Share on other sites More sharing options...
Guest xionmark Posted December 3, 2012 Share Posted December 3, 2012 Hi Edward, It did affect P as well, but there was a common variable used in calculating both v and P. Once I identified the questionable var I quickly located the error; there was a condition that would set this variable to 0, and thus subsequent calculations generated NAN's. (!) As often is the case one needs to step away from the computer for the answer to arrive ... :-) --Mark Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.