lib: switch to Number.isNaN
This enables the eslint no-self-compare rule.
The reason is to switch to the more natural Number.isNaN()
check. I benchmarked both versions and they are on par so we do not have to use those old ones anymore.
I also removed a NaN
check that was obsolete and added a test for that.
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
documentation is changed or added -
commit message follows commit guidelines
Affected core subsystem(s)
lib