Vitepress
This commit is contained in:
16
node_modules/shiki/samples/julia.sample
generated
vendored
Normal file
16
node_modules/shiki/samples/julia.sample
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
function mandelbrot(a)
|
||||
z = 0
|
||||
for i=1:50
|
||||
z = z^2 + a
|
||||
end
|
||||
return z
|
||||
end
|
||||
|
||||
for y=1.0:-0.05:-1.0
|
||||
for x=-2.0:0.0315:0.5
|
||||
abs(mandelbrot(complex(x, y))) < 2 ? print("*") : print(" ")
|
||||
end
|
||||
println()
|
||||
end
|
||||
|
||||
# From: https://rosettacode.org/wiki/Mandelbrot_set#Julia
|
||||
Reference in New Issue
Block a user