def __init__(self, id=0, origenx=0, origeny=0, destinox=0, destinoy=0, velocidad=0, red=0, green=0, blue=0, distancia=0): self.__id = id self.__origenx = origenx self.__origeny = origeny self.__destinox = destinox self.__destinoy = destinoy self.__velocidad = velocidad self.__red = red self.__green = green self.__blue = blue self.distancia = distancia_euclidiana(origenx, destinox, origeny, destinoy)
def __init__(self, id=0, origenX=0, origenY=0, destinoX=0, destinoY=0, velocidad=0, colorR=0, colorG=0, colorB=0, distancia=0): self.id = id self.origenX = origenX self.origenY = origenY self.destinoX = destinoX self.destinoY = destinoY self.velocidad = velocidad self.colorR = colorR self.colorG = colorG self.colorB = colorB self.distancia = distancia_euclidiana(origenX, origenY, destinoX, destinoY)
def __init__(self, Id=0, origen_X=0, origen_Y=0, destino_X=0, destino_Y=0, velocidad=0, rojo=0, verde=0, azul=0, distancia=0): self.__Id = Id self.__origenX = origen_X self.__origenY = origen_Y self.__destinoX = destino_X self.__destinoY = destino_Y self.__velocidad = velocidad self.__rojo = rojo self.__verde = verde self.__azul = azul self.__distancia = distancia_euclidiana(origen_X, origen_Y, destino_X, destino_Y)
def __init__(self, id=0, origen_x=0, origen_y=0, destino_x=0, destino_y=0, velocidad=0, red=0, green=0, blue=0, distancia=0.0): self.__id = id self.__origen_x = origen_x self.__origen_y = origen_y self.__destino_x = destino_x self.__destino_y = destino_y self.__velocidad = velocidad self.__red = red self.__green = green self.__blue = blue self.__distancia = distancia self.__distancia = distancia_euclidiana(origen_x, origen_y, destino_x, destino_y)
def __init__(self, id=0, origenX=0, origenY=0, destinoX=0, destinoY=0, velocidad=0, red=0, green=0, blue=0, distancia=0.0): self.__distancia = distancia_euclidiana(origenX, destinoX, origenY, destinoY) self.__id = id self.__origenX = origenX self.__origenY = origenY self.__destinoX = destinoX self.__destinoY = destinoY self.__velocidad = velocidad self.__red = red self.__green = green self.__blue = blue self.__distancia = distancia
def test_distancia1(): assert algoritmos.distancia_euclidiana(7, 5, 4, 1) == 5.0
def test_distancia3(): assert algoritmos.distancia_euclidiana(500, 500, 200, 200) == 424.26406871192853
def test_distancia2(): assert algoritmos.distancia_euclidiana(100, 200, 200, 1) == 222.71281956816046