Skip to main content

unif_rand

Function unif_rand 

Source
pub unsafe fn unif_rand() -> f64
Expand description

Generate a uniform random number in (0, 1).

§Important

Must call GetRNGstate() before and PutRNGstate() after. The safe form is RngGuard::unif_rand. Checked wrapper for unif_rand. Calls unif_rand_unchecked inside with_r_thread, which panics off R’s main thread. Generated from source location line 1616, column 12. Generated from source file miniextendr-api/src/sys.rs.