Closed Kaiser1989 closed 2 years ago
Well, I wonder why you'd want to...
But you can easily register a function, say inf()
, that simply returns infinity.
While you're at it, you may want to distinguish between positive vs negative infinity.
Inf, -Inf & NaN...
Maybe someone wants to check against NaN values. Just wondering if there are any build-in functions.
I will register them myself. THX for your fast answer!
If you just want to test them, there are these functions: https://rhai.rs/book/language/num-fn.html#floating-point-functions
is_nan
, is_finite
, is_infinite
I searched docs and code but didn't find anything.
Is it possible to write Infinity as number? Currently i'm only able to do it by this math statement:
outputs