'The x direction of the ray.
Positive infinity if the ray points in the positive x direction,
negative infinity if the ray points in the negative x direction,
or 0 if the ray is vertical.
See Also
ydirection
Examples
>>> from sympy import Point3D, Ray3D
>>> p1, p2, p3 = Point3D(0, 0, 0), Point3D(1, 1, 1), Point3D(0, -1, 0)
>>> r1, r2 = Ray3D(p1, p2), Ray3D(p1, p3)
>>> r1.xdirection
oo
>>> r2.xdirection
0'

@property
def xdirection(self):

    if (self.p1.x < self.p2.x):
        return S.Infinity
    elif (self.p1.x == self.p2.x):
        return S.Zero
    else:
        return S.NegativeInfinity
