algorithm-archive
algorithm-archive copied to clipboard
Monte carlo crystal
This PR adds the Monte Carlo methods in Crystal.
[lang: crystal]
Perhaps more idiomatic way to count points inside the circle would be
pi_count = n.times.count do
in_circle(rand, rand)
end
but other than that the code looks good to me.