I would like to have some kind of project-wide fail fast mechanism (maybe a RuntimeException
) for any code that causes assignment of NaN
.
In my project NaN
is never a valid value.
I realise I could add asserts (using isNaN) or other tests throughout but I want to know if there is a more elegant way.