Sep-29-2016, 06:56 PM
Hello,
Taking the following snippet of your code:
Taking the following snippet of your code:
if currentdist<prevdist: m=float ((yLast-yPrevious)/(xLast-xPrevious)) if m>0: if yalg[last]< ygoal: xlowrand=xalg[last] return float(xlowrand),float(xhighrand), else: xhighrand=xalg[last] return float(xlowrand),float(xhighrand)you could add a list which shows how the values were constructed like:
msg = [] if currentdist < prevdist: msg.append('currentdist < prevdist') m = float((yLast - yPrevious) / (xLast - xPrevious)) if m > 0: msg.append('m > 0') if yalg[last] < ygoal: xlowrand = xalg[last] return float(xlowrand), float(xhighrand), msg else: msg.append('m <= 0') xhighrand = xalg[last] return float(xlowrand), float(xhighrand), msgNow results will include a list like:
3.8855839217, 7.59979666373, ['currentdist < prevdist', 'm <= 0']Larz60+