mirror of
https://github.com/BelfrySCAD/BOSL2.git
synced 2025-01-01 09:49:45 +00:00
Simplified is_nan()
This commit is contained in:
parent
ba032e2f4d
commit
a78973187a
2 changed files with 2 additions and 6 deletions
|
@ -78,11 +78,7 @@ function is_integer(n) = is_num(n) && n == round(n);
|
|||
// is_nan(x);
|
||||
// Description:
|
||||
// Returns true if a given value `x` is nan, a floating point value representing "not a number".
|
||||
// This test is far more complicated than it should be, because while arguable correct, the tests
|
||||
// `is_num(nan)` and `nan==nan` both returns false.
|
||||
function is_nan(x) =
|
||||
!is_num(x) && !is_undef(x) && !is_string(x) &&
|
||||
!is_list(x) && !(x<=INF) && is_undef(x[0]);
|
||||
function is_nan(x) = (x!=x);
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
BOSL_VERSION = [2,0,117];
|
||||
BOSL_VERSION = [2,0,118];
|
||||
|
||||
|
||||
// Section: BOSL Library Version Functions
|
||||
|
|
Loading…
Reference in a new issue