diff --git a/05_Mandelbulb/Mandel.hs b/05_Mandelbulb/Mandel.hs index 9500e0b..7c1ef34 100644 --- a/05_Mandelbulb/Mandel.hs +++ b/05_Mandelbulb/Mandel.hs @@ -3,11 +3,12 @@ module Mandel (mandel) where import ExtComplex +mandel :: Float -> Float -> Float -> Int -> Int mandel r i s nbIterations = f (extcomplex r i s) 0 nbIterations where f :: ExtComplex -> ExtComplex -> Int -> Int - f c z 0 = 0 + f _ _ 0 = 0 f c z n = if (magnitude z > 2 ) then n else f c ((z*z)+c) (n-1) diff --git a/05_Mandelbulb/Mandelbulb.lhs b/05_Mandelbulb/Mandelbulb.lhs index 7bba54b..0592ad2 100644 --- a/05_Mandelbulb/Mandelbulb.lhs +++ b/05_Mandelbulb/Mandelbulb.lhs @@ -230,7 +230,7 @@ The rest is similar to the preceding sections. > -- where ε=(max-min)/2^(nbtest+1) > maxZeroIndex :: (Fractional a,Num a,Num b,Eq b) => > (a -> b) -> a -> a -> Int -> a -> maxZeroIndex func minval maxval 0 = (minval+maxval)/2 +> maxZeroIndex _ minval maxval 0 = (minval+maxval)/2 > maxZeroIndex func minval maxval n = > if (func medpoint) /= 0 > then maxZeroIndex func minval medpoint (n-1) diff --git a/06_Mandelbulb/Mandel.hs b/06_Mandelbulb/Mandel.hs index 5b93f03..7c1ef34 100644 --- a/06_Mandelbulb/Mandel.hs +++ b/06_Mandelbulb/Mandel.hs @@ -3,7 +3,7 @@ module Mandel (mandel) where import ExtComplex -mandel :: GLfloat -> GLfloat -> GLfloat -> Int -> Int +mandel :: Float -> Float -> Float -> Int -> Int mandel r i s nbIterations = f (extcomplex r i s) 0 nbIterations where