Added NAN, INF, and is_nan().

This commit is contained in:
Revar Desmera
2020-02-06 22:51:16 -08:00
parent 28f07a997f
commit ba032e2f4d
3 changed files with 17 additions and 1 deletions

View File

@@ -14,6 +14,10 @@ PHI = (1+sqrt(5))/2; // The golden ratio phi.
EPSILON = 1e-9; // A really small value useful in comparing FP numbers. ie: abs(a-b)<EPSILON
INF = 1/0; // The value `inf`, useful for comparisons.
NAN = acos(2); // The value `nan`, useful for comparisons.
// Section: Simple math