File otp_src_18.3.1-lib-gs-mandel.patch of Package erlang
diff -Ndur otp_src_18.3.1/lib/gs/contribs/mandel/mandel.erl otp_src_18.3.1-lib-gs-mandel/lib/gs/contribs/mandel/mandel.erl
--- otp_src_18.3.1/lib/gs/contribs/mandel/mandel.erl 2016-04-01 21:19:13.000000000 +0300
+++ otp_src_18.3.1-lib-gs-mandel/lib/gs/contribs/mandel/mandel.erl 2016-04-06 22:09:57.332428750 +0300
@@ -124,7 +124,7 @@
main(State2, [], Nodes, ToDo).
try_random(random,Low,High) ->
- random:uniform()*(High-Low)+Low;
+ rand:uniform()*(High-Low)+Low;
try_random(Float,_Low,_High) when is_number(Float) -> Float.
@@ -308,17 +308,15 @@
list_to_tuple([{0,0,0}|colors(MaxColors)]).
colors(Ncolors) ->
- {A,B,C}=erlang:now(),
- random:seed(A,B,C),
Colors = random_colors(Ncolors),
Colors2 = best_insert([hd(Colors)],tl(Colors)),
Colors2.
random_colors(0) -> [];
random_colors(N) ->
- R = random:uniform(256)-1,
- G = random:uniform(256)-1,
- B = random:uniform(256)-1,
+ R = rand:uniform(256)-1,
+ G = rand:uniform(256)-1,
+ B = rand:uniform(256)-1,
[{R,G,B}|random_colors(N-1)].
best_insert(Sorted,[RGB|Unsorted]) ->