CE/improve runs

done.

On Mon, Nov 3, 2014 at 4:35 PM, Fabian <notifications@github.com> wrote:

> In RandomRun/Run.m:
>
> >                                            run.routes = routes;
> > -                                          completion(run);
> > -                                      } else {
> > -                                          completion(nil);
> > -                                      }
> > -                                  }];
> > +
> > +                                          if (run.error < minErrorRun.error) {
> > +                                              minErrorRun.routes = routes;
> > +                                          }
> > +
> > +                                          if ([run lengthIsWithinTolerance:0.20]) {
>
> By injecting, I mean that it's good to pass it as a parameter to
> lengthIsWithinTolerance:. That lets us rely on the magic number in as few
> places in the code as possible. We should probably pull this out.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/mojotech/random-run/pull/5/files#r19768035>.
>