def iscollinear(self, other): """Check if another vector is collinear Two vectors are collinear if they have parallel or antiparallel """ from skhep.math.numeric import isequal return isequal(abs(self.cosdelta(other)), 1)
def islightlike(self): """Check if Lorentz Vector is light-like.""" from skhep.math.numeric import isequal return isequal(self.mag2, 0.)
def isantiparallel(self, other): """Check if another vector is antiparallel. Two vectors are antiparallel if they have opposite direction but not necessarily the same magnitude. """ from skhep.math.numeric import isequal return isequal(self.cosdelta(other), -1)
def istimelike(self): """Check if Lorentz Vector is time-like.""" from skhep.math.numeric import isequal return self.mag2 > 0. and not isequal(self.mag2, 0.)