The secret life of NaN
Incidentally, I found a cool way of checking whether NaN occurred:Just do:void some_function(float number)
{
  if(number != number)
    number was passed in as 
}Took me a little bit to get my head around it but if the number is not equal to the number, then a problem occurred. I used this to stop camera code (driven by floats) from crashing when receiving non-sense input coordinates. It still doesn't work properly, but it doesn't crash now either! (at least not for that :)