we have to take combination of all the points.. so shall we use case?? it
will repeat then also


On Sat, Apr 13, 2013 at 1:54 AM, Vikraman <notifications@github.com> wrote:

> In src/Main.hs:
>
> > +                            lineTo (w/2 + r*sin (3*t)) (h/2 + r*cos (3*t)+15)
> > +  else if keyv=="6" then do moveTo (w/2 + r*sin(2*t)-15) (h/2 + r*cos (2*t))
> > +                            lineTo (w/2 + r*sin (4*t)) (h/2 + r*cos (4*t)+15)
> > +  else if keyv=="7" then do moveTo (w/2 + r*sin(2*t)-15) (h/2 + r*cos (2*t))
> > +                            lineTo (w/2 + r*sin (5*t)) (h/2 + r*cos (5*t)+15)
> > +  else if keyv=="8" then do moveTo (w/2 + r*sin(2*t)-15) (h/2 + r*cos (2*t))
> > +                            lineTo (w/2 + r*sin (6*t)) (h/2 + r*cos (6*t)+15)
> > +  else if keyv=="9" then do moveTo (w/2 + r*sin(3*t)-15) (h/2 + r*cos (3*t))
> > +                            lineTo (w/2 + r*sin (4*t)) (h/2 + r*cos (4*t)+15)
> > +  else if keyv=="a" then do moveTo (w/2 + r*sin(3*t)-15) (h/2 + r*cos (3*t))
> > +                            lineTo (w/2 + r*sin (5*t)) (h/2 + r*cos (5*t)+15)
> > +  else if keyv=="b" then do moveTo (w/2 + r*sin(3*t)-15) (h/2 + r*cos (3*t))
> > +                            lineTo (w/2 + r*sin (6*t)) (h/2 + r*cos (6*t)+15)
> > +  else if keyv=="c" then do moveTo (w/2 + r*sin(4*t)-15) (h/2 + r*cos (4*t))
> > +                            lineTo (w/2 + r*sin (5*t)) (h/2 + r*cos (5*t)+15)
> > +  else if keyv=="d" then do moveTo (w/2 + r*sin(4*t)-15) (h/2 + r*cos (4*t))
>
> There is so much code duplication in these lines. Can you make this a
> little better?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/vikraman/Sim/pull/2/files#r3779488>
> .
>



-- 
*_______________________________________________
*Prashant Kumar Singh
Dept. of Computer Science & Engineering
IIT Kanpur, Kanpur, 208016- India.*
_______________________________________________*