Add missing uniform/0 function
This commit is contained in:
parent
25389893cf
commit
38e9b0e80a
2 changed files with 9 additions and 2 deletions
|
@ -5,6 +5,7 @@
|
|||
|
||||
%% API
|
||||
-export([
|
||||
uniform/0,
|
||||
uniform/1,
|
||||
seed/0,
|
||||
rand_bytes/1
|
||||
|
@ -14,6 +15,9 @@
|
|||
%%% New (r19+) rand style functions
|
||||
%%%===================================================================
|
||||
-ifndef(old_rand).
|
||||
uniform() ->
|
||||
rand:uniform().
|
||||
|
||||
uniform(N) ->
|
||||
rand:uniform(N).
|
||||
|
||||
|
@ -27,6 +31,9 @@ rand_bytes(Size) ->
|
|||
%%%===================================================================
|
||||
%%% Old (r18) random style functions
|
||||
%%%===================================================================
|
||||
uniform() ->
|
||||
random:uniform().
|
||||
|
||||
uniform(N) ->
|
||||
random:uniform(N).
|
||||
|
||||
|
|
|
@ -319,10 +319,10 @@ get_compressiblevalue() ->
|
|||
L).
|
||||
|
||||
generate_smallobjects(Count, KeyNumber) ->
|
||||
generate_objects(Count, KeyNumber, [], crypto:rand_bytes(512)).
|
||||
generate_objects(Count, KeyNumber, [], leveled_rand:rand_bytes(512)).
|
||||
|
||||
generate_objects(Count, KeyNumber) ->
|
||||
generate_objects(Count, KeyNumber, [], crypto:rand_bytes(4096)).
|
||||
generate_objects(Count, KeyNumber, [], leveled_rand:rand_bytes(4096)).
|
||||
|
||||
|
||||
generate_objects(Count, KeyNumber, ObjL, Value) ->
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue