jow- / ucode

JavaScript-like language with optional templating
ISC License
87 stars 24 forks source link

math: add isnan() function #129

Closed jow- closed 1 year ago

jow- commented 1 year ago

Add a new isnan() convenience function to the math library which can be used to test if a given value is a NaN double.

The same test can be realized without the math library by using a function similar to the following one:

function isNaN(x) {
    return x != x;
}

Signed-off-by: Jo-Philipp Wich jo@mein.io