Skip to content

Commit

Permalink
fixed bug in fractals.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentcp committed Oct 13, 2017
1 parent 0c05847 commit 964eb6e
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions src/domains/fractals.jl
Original file line number Diff line number Diff line change
Expand Up @@ -48,18 +48,17 @@ function computemandelbrotgrid(grid, maxiter, threshold)
end

function indomain_broadcast(grid, m::Mandelbrot)
# if (leftendpoint(grid) ≈ leftendpoint(m.box)) && (rightendpoint(grid) ≈ rightendpoint(m.box))
# if haskey(m.maskcache, size(grid,1))
# mask = m.maskcache[size(grid,1)]
# else # compute mask and cache it
# mask = computemandelbrotgrid(grid, m.maxiter, m.threshold)
# m.maskcache[size(grid,1)] = mask
# end
# else # Don't cache if the grid doesn't match the bounding box
warn("Merge with branch that calculates this more efficient")
if (map(leftendpoint, elements(grid)) leftendpoint(m.box)) && (map(rightendpoint,elements(grid)) rightendpoint(m.box))
if haskey(m.maskcache, size(grid,1))
mask = m.maskcache[size(grid,1)]
else # compute mask and cache it
mask = computemandelbrotgrid(grid, m.maxiter, m.threshold)
m.maskcache[size(grid,1)] = mask
end
else # Don't cache if the grid doesn't match the bounding box
mask = computemandelbrotgrid(grid, m.maxiter, m.threshold)
# end
# mask
end
mask
end

function isapprox{T}(t::Tuple{T,T}, v::SVector{2,T})
Expand Down

0 comments on commit 964eb6e

Please sign in to comment.