As a Roblox developer, it is currently too hard to debug where nan happens
Sometimes I will get a nan because in some way my velocity,orientation,rotvelocity,position,camera lookvector,and ground normal all match up in one specific way
This can be hard to replicate and I’ve spent 10s of minutes trying to get it right again because I am tired and I don’t want to look through all the code to understand where it breaks (or I might not even be aware of the specific edge case that returns nan)
It’s been proposed before to always throw an error when nan is present, but I understand this is disruptive and nan may have some uses because it’s the only value where rawequal(x,x)
is false
So instead I’d like it if there were a way to turn on nan for the specific thread like debug.profilebegin
and to turn it off, debug.profileend
This would help a lot with debugging