Constrained random points on a circle: Difference between revisions
Content added Content deleted
m (→{{header|Wren}}: Changed to Wren S/H) |
(Added Easylang) |
||
Line 1,050: | Line 1,050: | ||
end; |
end; |
||
end.</syntaxhighlight> |
end.</syntaxhighlight> |
||
=={{header|EasyLang}}== |
|||
[https://easylang.dev/show/#cod=bY7NDoJADITvPMV3VIhkF4MnfBiCGDfhJ64E4e2Zit7soelMZ6Z9P0LX0gwTFd65BFi4EuvhNvacPSf8xdj1LxvFvp5x4rCQyplJl7IebRfuSqSSDfnUNfrSNiq7mAl/YT/OLaWT33KKfbSo4qcPsdGjH32e5Bs= Run it] |
|||
<syntaxhighlight> |
|||
while cnt < 100 |
|||
x = random 31 - 16 |
|||
y = random 31 - 16 |
|||
r = sqrt (x * x + y * y) |
|||
if 10 <= r and r <= 15 |
|||
cnt += 1 |
|||
move 50 + x * 2 50 + y * 2 |
|||
circle 1 |
|||
. |
|||
. |
|||
</syntaxhighlight> |
|||
=={{header|EchoLisp}}== |
=={{header|EchoLisp}}== |