def dist_sq(self, other=None):
        v = self - other if other else self
        return sum(map(lambda a: a * a, v))
For fast length comparison
dataset/ETHPy150Open SpockBotMC/SpockBot/spockbot/vector.py/CartesianVector.dist_sq