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