Skip to content

Commit 29d521e

Browse files
committed
Added infinity
1 parent c4c140f commit 29d521e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/misc.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ pub mod misc_functions {
55
use crate::{if_list_convert_to_vec_float_and_do, if_list_do_int_or_do_float};
66
use rhai::{Array, Dynamic, EvalAltResult, Position, FLOAT};
77

8+
/// Infinity
9+
#[allow(non_upper_case_globals)]
10+
pub const inf: FLOAT = FLOAT::INFINITY;
11+
812
/// Returns a random number between zero and one.
913
/// ```typescript
1014
/// let r = rand();

0 commit comments

Comments
 (0)