def cross(self, vec):
        """Return the 2d cross product of self with another vector.
        Cross product doesn't make sense in 2D, but return the Z component
        of the 3d result.
        """

        return self.x * vec.y - vec.x * self.y
def cross ( self , vec ) : return self . x * vec . y - vec . x * self . y
Return the 2d cross product of self with another vector.
        Cross product doesn't make sense in 2D, but return the Z component
        of the 3d result.