Skip to main content

GetRNGstate_unchecked

Function GetRNGstate_unchecked 

Source
pub unsafe extern "C-unwind" fn GetRNGstate_unchecked()
Expand description

Save the current RNG state from R’s global state.

Must be called before using unif_rand(), norm_rand(), etc. The state is restored with PutRNGstate().

§Example

unsafe {
    GetRNGstate();
    let x = unif_rand();
    let y = norm_rand();
    PutRNGstate();
}

Unchecked FFI binding for GetRNGstate. Generated from source location line 3235, column 12. Generated from source file miniextendr-api/src/ffi.rs.