import { srand } from "https://deno.land/x/denops_std@v3.10.1/function/vim/mod.ts";
Initialize seed used by |rand()|:
- If {expr} is not given, seed values are initialized by reading from /dev/urandom, if possible, or using time(NULL) a.k.a. epoch time otherwise; this only has second accuracy.
- If {expr} is given it must be a Number. It is used to initialize the seed values. This is useful for testing or when a predictable sequence is intended. Examples: :let seed = srand() :let seed = srand(userinput) :echo rand(seed)
Parameters
denops: Denops