summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mandelbrot.jl8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mandelbrot.jl b/src/mandelbrot.jl
index bde0a74..9cddee7 100644
--- a/src/mandelbrot.jl
+++ b/src/mandelbrot.jl
@@ -1,6 +1,6 @@
-type Mandelbrot
- c::Array{Complex{Float64}, 2}
- z::Array{Complex{Float64}, 2}
+type Mandelbrot{T <: FloatingPoint}
+ c::Array{Complex{T}, 2}
+ z::Array{Complex{T}, 2}
Mandelbrot(imgsize) = (
line = linspace(-2.0, 2.0, imgsize);
@@ -9,6 +9,6 @@ type Mandelbrot
)
end
-function step(m::Mandelbrot)
+function step{T <: FloatingPoint}(m::Mandelbrot{T})
m.z = m.z.^2 + m.c
end