Skip to content
Snippets Groups Projects
Commit 479a6dd4 authored by Brian Terlson's avatar Brian Terlson
Browse files

Merge pull request #66 from smikes/Math-isNaN

es6/Math: use Number.isNaN
parents 2230f90e bd80bf7d
No related branches found
No related tags found
No related merge requests found
...@@ -13,7 +13,7 @@ includes: [runTestCase.js] ...@@ -13,7 +13,7 @@ includes: [runTestCase.js]
---*/ ---*/
function testcase() { function testcase() {
if(Math.fround(NaN) === NaN) { if(Number.isNaN(Math.fround(NaN))) {
return true; return true;
} }
} }
......
...@@ -15,7 +15,7 @@ includes: [runTestCase.js] ...@@ -15,7 +15,7 @@ includes: [runTestCase.js]
---*/ ---*/
function testcase() { function testcase() {
if(Math.hypot(NaN, 3) === NaN) { if(Number.isNaN(Math.hypot(NaN, 3))) {
return true; return true;
} }
} }
......
...@@ -13,7 +13,7 @@ includes: [runTestCase.js] ...@@ -13,7 +13,7 @@ includes: [runTestCase.js]
---*/ ---*/
function testcase() { function testcase() {
if(Math.trunc(NaN) === NaN) { if(Number.isNaN(Math.trunc(NaN))) {
return true; return true;
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment