determine the magnitude of this location from the origin (presume values represent a Vector)

def magnitude(self, allow3d=True):
        """determine the magnitude of this location from the origin (presume values represent a Vector)"""
        ret = self.x**2 + self.y**2
        if allow3d: ret += self.z**2
        return ret**0.5 # square root