All pastes #88868 Raw Edit

Donno

public python v1 · immutable
#88868 ·published 2006-07-15 12:25 UTC
rendered paste body
def linear(control,ix,iy, tox,toy,speed):    if (tox - ix):        b = self.iy - (m * self.ix)    else:        m = 0    x = ix    y = iy    if m:        if tox < self.ix:            while not x == tox:                if y != toy:                    x -= speed                y = (m * x) + b                self.setPosition(x,y)                sleep(0.08)        else:            while not self.x == tox:                if self.y != toy:                    self.x += speed                y = (m * x) + b                control.setPosition(x,y)                sleep(0.08)    else:        if self.iy > toy:            realto = toy            self.y = toy            toy = self.iy        while self.y < toy:            x = ix            if iy > y:                toy -= speed                y -= speed                control.setPosition(self.x,toy)                if toy == realto:   y = toy            else:                self.y += speed                control.setPosition(x,y)            sleep(0.08)