function ret = montecarlo_pi(maxCount)
sum = 0;
for i = 1:maxCount
    x = rand;
    y = rand;
    
    if x*x + y*y <= 1
        sum = sum+1;
        rectangle('position', [x-0.001 y-0.001 0.002 0.002]);
    end
end

ret = sum / maxCount * 4;
